Skip to content

[java] UseEqualsToCompareStrings false positive with PMD 6.30.0 #3004

@matthiaskraaz

Description

@matthiaskraaz

Rule: errorprone.xml/UseEqualsToCompareStrings

The following code generates a false positive:

  boolean f(String s) {
    return s.charAt(0) == s.charAt(1);
  }

Metadata

Metadata

Assignees

Labels

a:false-positivePMD flags a piece of code that is not problematic

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions