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

[SE] Add the support of org.apache.commons.lang3.ArrayUtils to method behavior cache

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Symbolic Execution
    • Labels:
      None

      Description

      Methods from org.apache.commons.lang3.ArrayUtils like 'isEmpty', 'isNotEmpty', ... should be added to the java analyzer org/sonar/java/se/xproc/org.apache.commons.lang3.json configuration to prevent this kind of false-positive:

      // params is Nullable
      if (ArrayUtils.isNotEmpty(params) &&
          params[0] == 1) { // S2259 false-positive
      }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            alban.auzeill Alban Auzeill
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: