Class FindNullDerefsInvolvingNonShortCircuitEvaluation

All Implemented Interfaces:
Detector, Priorities, org.apache.bcel.classfile.Visitor

public class FindNullDerefsInvolvingNonShortCircuitEvaluation extends OpcodeStackDetector
  • Field Details

    • DEBUG

      private static boolean DEBUG
    • bugReporter

      BugReporter bugReporter
  • Constructor Details

    • FindNullDerefsInvolvingNonShortCircuitEvaluation

      public FindNullDerefsInvolvingNonShortCircuitEvaluation(BugReporter bugReporter)
  • Method Details

    • visit

      public void visit(org.apache.bcel.classfile.Code code)
      Overrides:
      visit in class DismantleBytecode
    • sawOpcode

      public void sawOpcode(int seen)
      Description copied from class: OpcodeStackDetector

      By default, this method will not be called when stack is TOP. To change this behavior, override #beforeOpcode(int) and change to return true even if stack is TOP.

      see Using FindBugs for Research to learn lattice and what TOP means.

      Specified by:
      sawOpcode in class OpcodeStackDetector
      See Also:
    • checkForNullForcingABranch

      private void checkForNullForcingABranch(int seen, int nextOpcode, OpcodeStack.Item item)
    • findLocation

      @CheckForNull Location findLocation(CFG cfg, int pc)
    • findLocation

      @CheckForNull Location findLocation(CFG cfg, org.apache.bcel.generic.InstructionHandle handle)
    • nullGuaranteesBranch

      private boolean nullGuaranteesBranch(int seen, OpcodeStack.Item item)