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] UseEqualsToCompareStrings: FP with "var" variables · Issue #2979 · pmd/pmd Closed Labels a:false-positivePMD flags a piece of code that is not problematicin:type-resolutionAffects the type resolution code Milestone DescriptionAffects PMD Version: 6.30.0 Rule: UseEqualsToCompareStrings Description: This might be related to #2976 as CompareObjectsWithEquals falsely detects this as well. Neither of the violations are reported if the variables are declared as "String" instead of "var". Code Sample demonstrating the issue: final Matcher matcher = ...; if (matcher.matches()) { final var firstString = matcher.group("a"); final var secondString = matcher.group("b"); if (firstString.isEmpty() != secondString.isEmpty()) { // <- violation // ... } } Expected outcome:
Running PMD through: Other Activity
MetadataMetadataAssigneesLabelsa:false-positivePMD flags a piece of code that is not problematicin:type-resolutionAffects the type resolution 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. |