edu.umd.cs.findbugs.detect

Class FindNullDeref

public class FindNullDeref extends Object implements Detector, NullDerefAndRedundantComparisonCollector

A Detector to find instructions where a NullPointerException might be raised. We also look for useless reference comparisons involving null and non-null values.

Author: David Hovemeyer William Pugh

See Also: IsNullValueAnalysis

Field Summary
static booleanDEBUG
Constructor Summary
FindNullDeref(BugReporter bugReporter)
Method Summary
voidfoundGuaranteedNullDeref(Set<Location> assignedNullLocationSet, Set<Location> derefLocationSet, SortedSet<Location> doomedLocations, ValueNumberDataflow vna, ValueNumber refValue, BugAnnotation variableAnnotation, NullValueUnconditionalDeref deref, boolean npeIfStatementCovered)
voidfoundNullDeref(ClassContext classContext, Location location, ValueNumber valueNumber, IsNullValue refValue, ValueNumberFrame vnaFrame)
voidfoundRedundantNullCheck(Location location, RedundantBranch redundantBranch)
static booleanisThrower(BasicBlock target)
voidreport()
booleanskipIfInsideCatchNull()
voidvisitClassContext(ClassContext classContext)

Field Detail

DEBUG

public static final boolean DEBUG

Constructor Detail

FindNullDeref

public FindNullDeref(BugReporter bugReporter)

Method Detail

foundGuaranteedNullDeref

public void foundGuaranteedNullDeref(Set<Location> assignedNullLocationSet, Set<Location> derefLocationSet, SortedSet<Location> doomedLocations, ValueNumberDataflow vna, ValueNumber refValue, BugAnnotation variableAnnotation, NullValueUnconditionalDeref deref, boolean npeIfStatementCovered)

foundNullDeref

public void foundNullDeref(ClassContext classContext, Location location, ValueNumber valueNumber, IsNullValue refValue, ValueNumberFrame vnaFrame)

foundRedundantNullCheck

public void foundRedundantNullCheck(Location location, RedundantBranch redundantBranch)

isThrower

public static boolean isThrower(BasicBlock target)

report

public void report()

skipIfInsideCatchNull

public boolean skipIfInsideCatchNull()

visitClassContext

public void visitClassContext(ClassContext classContext)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.