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

S3824: raise issue when "containsKey" is used

    Details

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

      Description

      void abc(Map<String, Object> map, String key) {
        if (!map.containsKey(key)) { // FN here
          map.put(key, new Object());
        }
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                margarita.nedzelska Margarita Nedzelska
                Reporter:
                elena.vilchik Elena Vilchik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: