[java] Fix #6602: Fix false negative in LocalVariableCouldBeFinalRule#6603
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
| Duplication | 0 |
TIP This summary will be updated as you push new changes. Give us feedback
|
Compared to main: (comment created at 2026-05-07 15:25:01+00:00 for f119b54) |
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
adangel
left a comment
There was a problem hiding this comment.
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!
Describe the PR
Special 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?
./mvnw clean verifypasses (checked automatically by github actions)