-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fastjson2 版本2.0.8,静态内部类无法反序列化 #531
Comments
能否提供下可以重现问题的完整case |
请参考附件实体类和json,反序列化代码如下 |
可先把内部类改为public,系类加载的classloader不同导致。代码中有针对isExternalClass和isPublic的判断,不知道是不是有意为之。 |
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.9-SNAPSHOT/ |
问题描述
fastjson2 版本2.0.8,静态内部类无法反序列化
在fastjson 1版本1.2.83 静态内部类反序列化没问题
环境信息
请填写以下信息:
重现步骤
*1.创建静态内部类,反序列化
2.我的是多层实体类,第二层有静态内部类
3、使用JSONObject.parseObject(jsonString, Test.class);
java.lang.IllegalAccessError: tried to access class com.example.demo.entity.xxx.xxxxxDTO$xxx from class com.alibaba.fastjson2.reader.ObjectReader_3
The text was updated successfully, but these errors were encountered: