1 19 package edu.umd.cs.findbugs.ba.npe; 20 21 import edu.umd.cs.findbugs.ba.Edge; 22 import edu.umd.cs.findbugs.ba.Location; 23 24 30 public class RedundantBranch { 31 public final Location location; 32 33 public final int lineNumber; 34 35 public final IsNullValue firstValue, secondValue; 36 37 public Edge infeasibleEdge; 38 39 51 public RedundantBranch(Location location, int lineNumber, 52 IsNullValue firstValue, IsNullValue secondValue) { 53 this.location = location; 54 this.lineNumber = lineNumber; 55 this.firstValue = firstValue; 56 this.secondValue = secondValue; 57 } 58 59 69 public RedundantBranch(Location location, int lineNumber, 70 IsNullValue firstValue) { 71 this.location = location; 72 this.lineNumber = lineNumber; 73 this.firstValue = firstValue; 74 this.secondValue = null; 75 } 76 77 82 public void setInfeasibleEdge(Edge infeasibleEdge) { 83 this.infeasibleEdge = infeasibleEdge; 84 } 85 86 @Override 87 public String toString() { 88 return location.toString() + ": line " + lineNumber; 89 } 90 } 91 | Popular Tags |