Skip to content

Issue #18599: Fix ObjectEqualsForPrimitives violations#18622

Closed
abhayrajjais01 wants to merge 1 commit into
checkstyle:masterfrom
abhayrajjais01:fix-ObjectEqualsForPrimitives
Closed

Issue #18599: Fix ObjectEqualsForPrimitives violations#18622
abhayrajjais01 wants to merge 1 commit into
checkstyle:masterfrom
abhayrajjais01:fix-ObjectEqualsForPrimitives

Conversation

@abhayrajjais01

@abhayrajjais01 abhayrajjais01 commented Jan 12, 2026

Copy link
Copy Markdown

issue
#18599

@Pankraz76 Pankraz76 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done but please dont kill other check.

Comment thread pom.xml
-Xep:MockitoStubbing:ERROR
-Xep:NestedOptionals:ERROR
-Xep:OptionalOrElseGet:ERROR
-Xep:PrimitiveComparison:ERROR

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
@abhayrajjais01 abhayrajjais01 force-pushed the fix-ObjectEqualsForPrimitives branch 2 times, most recently from 617ba97 to 1b74267 Compare January 13, 2026 07:51
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 14, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 14, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 15, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 15, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 15, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 15, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 15, 2026
@abhayrajjais01 abhayrajjais01 force-pushed the fix-ObjectEqualsForPrimitives branch from 4c1e2a9 to 032b9c7 Compare January 15, 2026 11:28
@abhayrajjais01 abhayrajjais01 force-pushed the fix-ObjectEqualsForPrimitives branch 3 times, most recently from 5ab640b to 5bc734b Compare January 16, 2026 13:54

@Pankraz76 Pankraz76 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯
thanks for the effort.

@abhayrajjais01

Copy link
Copy Markdown
Author

@romani
@Pankraz76
I have made changes
Check it out

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confusion:

Comment thread pom.xml
-Xep:NestedOptionals:ERROR
-Xep:OptionalOrElseGet:ERROR
-Xep:PrimitiveComparison:ERROR
-Xep:ObjectEqualsForPrimitives:ERROR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see in PR fixes for code.

but in issue there are violations:

[INFO] --- compiler:3.14.1:compile (error-prone-compile) @ checkstyle ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 473 source files with javac [debug release 21] to target/classes
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java:[88,30] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean 'return (line == lineColumn.line)'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java:[89,34] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean '&& (column == lineColumn.column);'?
Warning:  /home/runner/work/checkstyle/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java:[367,30] [ObjectEqualsForPrimitives] Avoid unnecessary boxing by using plain == for primitive types.
    (see https://errorprone.info/bugpattern/ObjectEqualsForPrimitives)
  Did you mean 'return (lineNo == violation.lineNo)'?

@Pankraz76 Pankraz76 Jan 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have kind of the same issue.

await this one to do the job as ci going crazy on this.

@abhayrajjais01 abhayrajjais01 force-pushed the fix-ObjectEqualsForPrimitives branch 9 times, most recently from 57df818 to 0d440e0 Compare January 17, 2026 19:44
@abhayrajjais01 abhayrajjais01 force-pushed the fix-ObjectEqualsForPrimitives branch from 0d440e0 to a067204 Compare January 17, 2026 20:31
@abhayrajjais01 abhayrajjais01 requested a review from romani January 17, 2026 21:02
@romani

romani commented Jan 17, 2026

Copy link
Copy Markdown
Member

@abhayrajjais01 , you have 0 chance to be merged if you keep unrelated changes in PR.
you should keep in changes only and only changes related to ObjectEqualsForPrimitives.

@romani

romani commented Feb 20, 2026

Copy link
Copy Markdown
Member

Issue is closed

@romani romani closed this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants