ParameterizedTypeImpl cannot be cast to java.lang.Class

JackChu 发布于 2014/10/31 12:08
阅读 2K+
收藏 0

华为云11月刊推送:DIY微信问答机器人,高性能计算代码的20个技巧!>>>

@wenshao 你好,想跟你请教个问题:

在javabean里面有private Class<?>[] parameterTypes;这个属性时,会出现

Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
at com.alibaba.fastjson.parser.deserializer.ArrayDeserializer.deserialze(ArrayDeserializer.java:62) ~[fastjson-1.1.44.jar:?]
at Fastjson_ASM_SysncRequest_34.deserialze(Unknown Source) ~[?:?]
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:326) ~[fastjson-1.1.44.jar:?]
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1071) ~[fastjson-1.1.44.jar:?]
at com.alibaba.fastjson.parser.DefaultJSONParser.parse(DefaultJSONParser.java:1232) ~[fastjson-1.1.44.jar:?]
at com.alibaba.fastjson.parser.DefaultJSONParser.parse(DefaultJSONParser.java:1205) ~[fastjson-1.1.44.jar:?]
at com.alibaba.fastjson.JSON.parse(JSON.java:147) ~[fastjson-1.1.44.jar:?]
at com.alibaba.fastjson.JSON.parse(JSON.java:131) ~[fastjson-1.1.44.jar:?]
at com.alibaba.fastjson.JSON.parse(JSON.java:118) ~[fastjson-1.1.44.jar:?]

加载中
0
wenshao
wenshao
能提供重现问题的testcase么?
0
java9
java9
你属性里面的问号是啥?
返回顶部
顶部