Detector: | MuDetectOPAL_180312 |
Target: | project ' synthetic_survey ' versionjsl |
Misuse: | misuse ' mapkeynull ' |
Tags: |
Details about the known misuse from the MUBench dataset.
Description: | HashMap.get() throws if the key is null. Since you don't know which implementation of Map you get, you should always guard against this. |
Fix Description: | Check that the key is not null before calling Map.get(). |
Violation Types: |
|
In File: | mubench/examples/survey/Maps.java |
In Method: | keyMayBeNull(HashMap, String) |
Code with Misuse: |
|
Code with Pattern(s): |
|