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] LocalVariableCouldBeFinal: False negative when multiple variables are declared at once · Issue #6602 · pmd/pmd Closed Labels a:false-negativePMD doesn't flag a problematic piece of code Milestone DescriptionAffects PMD Version: 7.23.0 Rule: LocalVariableCouldBeFinal Description: When multiple variables are declared in the same line, and some of them could be final, LocalVariableCouldBeFinal is not raised. Code Sample demonstrating the issue: class Foo { void foo(boolean cond1) { int i=0, j=1; if (cond1) { i = 3; } IO.println(i + " " + j); } } Expected outcome: PMD should report a violation at line 3, but doesn't. This is a false-negative. If I split up the two declarations, there is a violation for j.
Running PMD through: CLI Activity
MetadataMetadataAssigneesLabelsa:false-negativePMD doesn't flag a problematic piece of code TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |