edu.umd.cs.findbugs.ba.npe

Class RedundantBranch

public class RedundantBranch extends Object

An instruction recorded as a redundant reference comparison. We keep track of the line number, in order to ensure that if the branch was duplicated, all duplicates are determined in the same way. (If they aren't, then we don't report it.)
Field Summary
IsNullValuefirstValue
EdgeinfeasibleEdge
intlineNumber
Locationlocation
IsNullValuesecondValue
Constructor Summary
RedundantBranch(Location location, int lineNumber, IsNullValue firstValue, IsNullValue secondValue)
Constructor.
RedundantBranch(Location location, int lineNumber, IsNullValue firstValue)
Constructor.
Method Summary
voidsetInfeasibleEdge(Edge infeasibleEdge)
Set the edge which has been determined to be infeasible.

Field Detail

firstValue

public final IsNullValue firstValue

infeasibleEdge

public Edge infeasibleEdge

lineNumber

public final int lineNumber

location

public final Location location

secondValue

public final IsNullValue secondValue

Constructor Detail

RedundantBranch

public RedundantBranch(Location location, int lineNumber, IsNullValue firstValue, IsNullValue secondValue)
Constructor.

Parameters: location Location of ref comparison lineNumber line number of ref comparison firstValue first value compared secondValue second value compared

RedundantBranch

public RedundantBranch(Location location, int lineNumber, IsNullValue firstValue)
Constructor.

Parameters: location Location of ref comparison lineNumber line number of ref comparison firstValue first value compared

Method Detail

setInfeasibleEdge

public void setInfeasibleEdge(Edge infeasibleEdge)
Set the edge which has been determined to be infeasible.

Parameters: infeasibleEdge The infeasibleEdge to set.

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.