Skip to content

Issue #15159: RedundantModifierCheck should violate final modifier on…#15492

Merged
rnveach merged 1 commit into
checkstyle:masterfrom
checkstyle-GSoC25:redundant-final-unnamed
Aug 24, 2024
Merged

Issue #15159: RedundantModifierCheck should violate final modifier on…#15492
rnveach merged 1 commit into
checkstyle:masterfrom
checkstyle-GSoC25:redundant-final-unnamed

Conversation

@mahfouz72

@mahfouz72 mahfouz72 commented Aug 12, 2024

Copy link
Copy Markdown
Member

@mahfouz72 mahfouz72 force-pushed the redundant-final-unnamed branch from 570fa0c to 11f0468 Compare August 12, 2024 20:09
@mahfouz72

mahfouz72 commented Aug 12, 2024

Copy link
Copy Markdown
Member Author

javac 21 job and javac on local outputs are not consistent

running command locally :

22


Job URL: https://app.circleci.com/pipelines/github/checkstyle/checkstyle/27299/workflows/a4aaa25c-0a96-4d6a-ab70-78aa5000d897/jobs/664816

src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/modifier/redundantmodifier/InputRedundantModifierFinalUnnamedVariables.java:29: error: illegal start of expression
            case Point(final int a, final int _) when a == 0 -> { }
                       ^
src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/modifier/redundantmodifier/InputRedundantModifierFinalUnnamedVariables.java:29: error: <identifier> expected
            case Point(final int a, final int _) when a == 0 -> { }
           

EDIT: The Java version locally is 22 but CI executions use version 21. The above code is not compilable by Java 21 (This is a bug in javac21 because Java grammar says that the code is valid) updating to a newer image version from Java 21 didn't help (java 21.0.2 has the same bug).

@mahfouz72

Copy link
Copy Markdown
Member Author

github, generate site

@nrmancuso

Copy link
Copy Markdown
Contributor

@mahfouz72 please show java versions and vendors for both CI execution and local, this is critical to help us understand what is going on here. We should also take a look at the grammar and see what it specifies.

@nrmancuso nrmancuso self-assigned this Aug 12, 2024
@romani

romani commented Aug 13, 2024

Copy link
Copy Markdown
Member

Github, generate report for RedundantModifier/all-examples-in-one

@github-actions

Copy link
Copy Markdown
Contributor

Report generation failed on phase "make_report",
step "Generate report".
Link: https://github.com/checkstyle/checkstyle/actions/runs/10362336627

@github-actions

Copy link
Copy Markdown
Contributor

@mahfouz72 mahfouz72 force-pushed the redundant-final-unnamed branch 2 times, most recently from d21bbff to 7661c1f Compare August 13, 2024 23:11
@mahfouz72

Copy link
Copy Markdown
Member Author

github, generate report

@mahfouz72 mahfouz72 force-pushed the redundant-final-unnamed branch from 7661c1f to e7562fd Compare August 13, 2024 23:24
@github-actions

Copy link
Copy Markdown
Contributor

@nrmancuso nrmancuso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Item:

@mahfouz72 mahfouz72 force-pushed the redundant-final-unnamed branch 2 times, most recently from e96de32 to 3e4da09 Compare August 19, 2024 23:33
@nrmancuso nrmancuso assigned rnveach and unassigned nrmancuso Aug 20, 2024
@nrmancuso nrmancuso requested a review from rnveach August 20, 2024 12:44
Comment thread config/pmd.xml
@mahfouz72 mahfouz72 force-pushed the redundant-final-unnamed branch from 3e4da09 to 0f74a07 Compare August 21, 2024 22:42
@mahfouz72 mahfouz72 force-pushed the redundant-final-unnamed branch 5 times, most recently from a33f0ee to bbe3eb3 Compare August 23, 2024 10:08
@mahfouz72

Copy link
Copy Markdown
Member Author

github, generate report

@github-actions

Copy link
Copy Markdown
Contributor

@mahfouz72

Copy link
Copy Markdown
Member Author

github, generate report

@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.

items:

Comment thread config/pmd.xml
@mahfouz72 mahfouz72 force-pushed the redundant-final-unnamed branch from bbe3eb3 to f33cf46 Compare August 23, 2024 14:07
@mahfouz72

Copy link
Copy Markdown
Member Author

I think failure in https://app.circleci.com/jobs/github/checkstyle/checkstyle/673440 is unrelated.

Starting a Gradle Daemon (subsequent builds will be faster)
Executing Gradle on JVM versions 16 and lower has been deprecated. This will fail with an error in Gradle 9.0. Use JVM 17 or greater to execute Gradle. Projects can continue to use older JVM versions via toolchains. Consult the upgrading guide for further information:

@mahfouz72

Copy link
Copy Markdown
Member Author

github, generate report

@mahfouz72 mahfouz72 force-pushed the redundant-final-unnamed branch from f33cf46 to 1f1fd6e Compare August 23, 2024 16:32
@github-actions

Copy link
Copy Markdown
Contributor

@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.

Ok to merge

@rnveach rnveach merged commit d010bda into checkstyle:master Aug 24, 2024
@mahfouz72 mahfouz72 deleted the redundant-final-unnamed branch May 9, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

RedundantModifer Should Violate Final Modifer on Unnamed Variables if jdkVersion GTE 22

4 participants