...
Code Block | ||
---|---|---|
| ||
if (obj == null) { for(Iterator it = col.iterator();it.hasNext();) { // col is currently named coll if (it.next() == null) { count++; } } } else { for (Iterator it = col.iterator();it.hasNext();) { // col is currently named coll if (obj.equals(it.next())) { count++; } } } |
Wiki Markup |
---|
DereferencingDereferences of null pointers can occurhappen in many path dependent ways. Due to the limitations of automatic detection tools, code review and manual inspection of code are inevitable \[[Hovemeyer 07|AA. Java References#Hovemeyer 07]\]. Annotations for method parameters that must be non-null can also alleviate the occurrences to a certain extent by aiding automatic detection. |
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
SEC01 EXP01-J | low | likely | high | P3 | L3 |
Automated Detection
...