|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.detect.FindNullDeref
public class FindNullDeref
A Detector to find instructions where a NullPointerException might be raised. We also look for useless reference comparisons involving null and non-null values.
IsNullValueAnalysis
Field Summary |
---|
Fields inherited from interface edu.umd.cs.findbugs.Detector |
---|
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY |
Constructor Summary | |
---|---|
FindNullDeref(BugReporter bugReporter)
|
Method Summary | |
---|---|
void |
foundNullDeref(Location location,
ValueNumber valueNumber,
IsNullValue refValue)
Subclasses should override this method to capture locations where a null pointer is dereferenced. |
void |
foundRedundantNullCheck(Location location,
RedundantBranch redundantBranch)
Subclasses should override this method to capture locations where a redundant null comparision is performed. |
static boolean |
isThrower(BasicBlock target)
|
void |
report()
This method is called after all classes to be visited. |
void |
visitClassContext(ClassContext classContext)
Visit the ClassContext for a class which should be analyzed for instances of bug patterns. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FindNullDeref(BugReporter bugReporter)
Method Detail |
---|
public void visitClassContext(ClassContext classContext)
Detector
visitClassContext
in interface Detector
classContext
- the ClassContextpublic void report()
Detector
report
in interface Detector
public void foundNullDeref(Location location, ValueNumber valueNumber, IsNullValue refValue)
NullDerefAndRedundantComparisonCollector
foundNullDeref
in interface NullDerefAndRedundantComparisonCollector
location
- the Location of the null dereferencevalueNumber
- the ValueNumber of the possibly-null valuerefValue
- the kind of possibly-null value dereferencedpublic static boolean isThrower(BasicBlock target)
public void foundRedundantNullCheck(Location location, RedundantBranch redundantBranch)
NullDerefAndRedundantComparisonCollector
foundRedundantNullCheck
in interface NullDerefAndRedundantComparisonCollector
location
- the Location of the redundant null checkredundantBranch
- the RedundantBranch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |