Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

final字段反系列化出错 #698

Closed
taoweiji opened this issue Jun 26, 2016 · 3 comments
Closed

final字段反系列化出错 #698

taoweiji opened this issue Jun 26, 2016 · 3 comments

Comments

@taoweiji
Copy link

taoweiji commented Jun 26, 2016

Caused by: com.alibaba.fastjson.JSONException: set property error, TAG at com.alibaba.fastjson.parser.deserializer.FieldDeserializer.setValue(FieldDeserializer.java:89) at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:641) at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:97) at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:682) at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:655) at com.alibaba.fastjson.JSON.parseObject(JSON.java:216) at com.alibaba.fastjson.JSON.parseObject(JSON.java:188) at com.alibaba.fastjson.JSON.parseObject(JSON.java:147) at com.alibaba.fastjson.JSON.parseObject(JSON.java:252)

public static final String TAG = UserInfo.class.getSimpleName();
版本:compile 'com.alibaba:fastjson:1.1.52.android'

@githublaohu
Copy link

反序列化,final,
依据java语言特性,final 应该是不支持反序列化。一定要序列化 final字段,违反了设计原则,语言原则。

@wenshao
Copy link
Member

wenshao commented Jun 27, 2016

没处理好static和final,将会尽快修正,谢谢反馈

@wenshao wenshao added this to the 1.1.53.android milestone Jun 27, 2016
@wenshao
Copy link
Member

wenshao commented Jun 27, 2016

已修复问题,将会尽快发布新版本1.1.53.android

@wenshao wenshao closed this as completed Jun 27, 2016
asa1997 pushed a commit to Be-Secure/fastjson that referenced this issue Feb 8, 2023
asa1997 pushed a commit to Be-Secure/fastjson that referenced this issue Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants