Errorprone BoxedPrimitiveEquality error on generated code by jsonschema2pojo #1625
Open
Description
When using ErrorProne on my project using jsonschema2pojo, it complains about the following errors:
[BoxedPrimitiveEquality] Comparison using reference equality instead of value equality. Reference equality of boxed primitive types is usually not useful, as they are value objects, and it is bug-prone, as instances are cached for some values but not others.
((this.myInteger == rhs.myInteger)||((this.myInteger!= null)&&this.myInteger.equals(rhs.myInteger)))
According to ErrorProne, the generated code should be:
(Objects.equals(this.myInteger, rhs.myInteger))
Metadata
Assignees
Labels
No labels