Issue #18599: Resolve error-prone violations for ObjectEqualsForPrimi…#18625
Issue #18599: Resolve error-prone violations for ObjectEqualsForPrimi…#18625VinishaWagh wants to merge 1 commit into
Conversation
|
Hello @romani to: Should we suppress this error? |
|
plz activate ObjectEqualsForPrimitives as error if fixed. like seen in:
|
|
@Pankraz76 |
romani
left a comment
There was a problem hiding this comment.
How to configure error prone to not do violations on n equals implementations ?
Such methods are generated.
db026ce to
14367de
Compare
14367de to
a46c1cd
Compare
@romani |
a46c1cd to
b1601a4
Compare
Please apply such annotation to all case, for now all items are wont fix, technically should be fixed, but this code is generated, so consistency is more critical. |
| && Objects.equals(columnNo, violation.columnNo) | ||
| && Objects.equals(columnCharIndex, violation.columnCharIndex) | ||
| && Objects.equals(tokenType, violation.tokenType) | ||
| // -@cs[BooleanExpressionComplexity] equals - a lot of fields to check. |
There was a problem hiding this comment.
please move suppression to https://github.com/checkstyle/checkstyle/blob/master/config/suppressions-xpath.xml
please do same for // -@cs[CyclomaticComplexity] equals - a lot of fields to check.
|
please supppress: |
|
Okay, I am on it! |
…lsForPrimitives
b1601a4 to
59284dd
Compare
| * @noinspectionreason EqualsCalledOnEnumConstant - enumeration is needed to keep | ||
| * code consistent | ||
| * @noinspection ObjectEqualsForPrimitives | ||
| * @noinspectionreason ObjectEqualsForPrimitives - this code is generated |
There was a problem hiding this comment.
Something is broken here
We do -Xep:ObjectEqualsForPrimitives:ERROR
And now we need suppression of Idea inspection in such places
|
@VinishaWagh the |

Issue : #18599
https://errorprone.info/bugpattern/ObjectEqualsForPrimitives
This PR handles the violations related to
ObjectEqualsForPrimitivesfor the given files:LineColumn.javaViolation.javaSuppressWithNearbyCommentFilter.javaSuppressWithPlainTextCommentFilter.javaSuppressionCommentFilter.java