如果我更改此方法:
public void setCustom(Map<String, Object> custom) {
this.custom = (LinkedHashMap<String, Object>)custom;
}
至:
public void setCustom(LinkedHashMap<String, Object> custom) {
this.custom = custom;
}
我必须更新serialVersionUID吗?它是兼容的更改吗?
不可以,序列化只能用于类成员变量,不能用于方法。有关必须考虑的更改的完整列表,请参见此处。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句