GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — [java] Fix #6602: Fix false negative in LocalVariableCouldBeFinalRule by UncleOwen · Pull Request #6603 · pmd/pmd Conversation
Member
Describe the PRSpecial handling for multiple declarations in one line was applied unconditionally. Should have been only applied if those multiple declaration were inside an ASTForInit. Related issues
Ready?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Compared to main: (comment created at 2026-05-07 15:25:01+00:00 for f119b54) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Special handling for multiple declarations in one line was applied unconditionally. Should have been only applied if those multiple declaration were inside an ASTForInit.
9d91fe6 to
133c2e1
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you add please the message verification in the rule test? (to verify we are actually reporting on "j").
Otherwise this PR looks fine, and I made up my mind and agree with your solution (to keep the special handling for for-init).
Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[java] LocalVariableCouldBeFinal: False negative when multiple variables are declared at once
There was an error while loading. Please reload this page.