开发者

XJC non-transient non-serializable instance field data

开发者 https://www.devze.com 2023-03-16 12:47 出处:网络
After generating java classes I received: public class myClass { @XmlElement(name = \"Data\", required = true)

After generating java classes I received:

public class myClass {

@XmlElement(name = "Data", required = true)
@XmlSchemaType(na开发者_C百科me = "date")
protected XMLGregorianCalendar data;
@XmlElement(name = "Time", required = true)
protected XMLGregorianCalendar time;
.........

FindBugs warns that myClass defines non-transient non-serializable instance field data. Is it warning acceptable or need to fix? Thanks.


It's fine to ignore this warning, these are special classes designed for a different serialization method (XML). You might as well set findbugs to ignore the entire generated package.

0

精彩评论

暂无评论...
验证码 换一张
取 消