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] CollapsibleIfStatements: not reported when a bare block separates the two if statements · Issue #7328 · pmd/pmd Milestone DescriptionAffects PMD Version: 7.28.0 Rule: CollapsibleIfStatements, https://docs.pmd-code.org/latest/pmd_rules_java_design.html#collapsibleifstatements Description: The nested Code Sample demonstrating the issue:
public class CifSeed { void bar(int x, int y) { if (x > 1) { if (y > 1) { // CollapsibleIfStatements System.out.println(x + y); } } } }
public class CifVariant { void bar(int x, int y) { if (x > 1) { { if (y > 1) { // the same nesting: not reported System.out.println(x + y); } } } } } Run: Expected outcome:
Running PMD through: CLI See also #7275. Output of the commands above: Activity
MetadataMetadataAssigneesLabelsNo labels 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. |