sonStr={"age":null,"ftest1":null,"id":null,"name":null,"test1":null,"test2":null}
类:
public class Person implements Serializable {
private String id;
private String name;
private Integer age;
private Double test1;
private Double test2;
private Float ftest1;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Double getTest1() {
return test1;
}
public void setTest1(Double test1) {
this.test1 = test1;
}
public Double getTest2() {
return test2;
}
public void setTest2(Double test2) {
this.test2 = test2;
}
public Float getFtest1() {
return ftest1;
}
public void setFtest1(Float ftest1) {
this.ftest1 = ftest1;
}
}
反序列化后 test1=0.0, test2=0.0, ftest=0.0
这不太合理吧,确认下这个是bug还是增加的新特性
4条答案
按热度按时间zfycwa2u1#
什么版本
5us2dqdw2#
测试了一下是1.2.37之后都这样
muk1a3rh3#
我也刚刚遇到了。
oyxsuwqo4#
我也发现这个问题了。 1.2.47也是。