Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3483

FN in S5869 with escaped character classes

    XMLWordPrintable

    Details

    • Type: False Negative
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.10
    • Component/s: Rules
    • Labels:

      Description

      S5869 does not report overlaps involving escaped character classes, such as the following:

      Pattern.compile("[\\w\\d]"); // Noncompliant because \\d is already included in \\w
      Pattern.compile("[\\wa-z]"); // Noncompliant because a-z is already included in \\w
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sebastian.hungerecker Sebastian Hungerecker
              Reporter:
              sebastian.hungerecker Sebastian Hungerecker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: