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] SimplifyConditional: False negative when null check and instanceof are separated by other && conditions · Issue #6513 · pmd/pmd Closed Labels a:false-negativePMD doesn't flag a problematic piece of code Milestone DescriptionAffects PMD Version: 7.22.0 Rule:SimplifyConditional Description: Code Sample demonstrating the issue: public class a{ public void foo(){ String s = "a"; if( s!=null&&s instanceof String){ // Scenario A: Direct adjacent case (correctly reported - TP) System.out.println(s); } String s2="a"; if(s!=null && s2!=null && s instanceof String){ // Scenario B: Intervening condition (False Negative) System.out.println(s); } } } Expected outcome: PMD should report a violation at line 10 with the message: 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. |