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] UnusedAssignment: False positive when using assert · Issue #5159 · pmd/pmd Closed Labels a:false-positivePMD flags a piece of code that is not problematic Milestone DescriptionAffects PMD Version: 7.4.0 Rule: https://docs.pmd-code.org/latest/pmd_rules_java_bestpractices.html#unusedassignment Description: The rule incorrectly assumes that Code Sample demonstrating the issue: {
boolean assertionsAreEnabled = false;
//noinspection AssertWithSideEffects
assert assertionsAreEnabled = true;
if (assertionsAreEnabled)
return newInstance(value, name, getAssumeThatConfiguration());
return MapValidatorNoOp.getInstance();
}Expected outcome: PMD reports a violation at line Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other] Activity
MetadataMetadataAssigneesLabelsa:false-positivePMD flags a piece of code that is not problematic 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. |