Class FindNonShortCircuit

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

public class FindNonShortCircuit extends OpcodeStackDetector implements StatelessDetector
  • Field Details

    • NS_NON_SHORT_CIRCUIT

      static final String NS_NON_SHORT_CIRCUIT
      See Also:
    • NS_DANGEROUS_NON_SHORT_CIRCUIT

      static final String NS_DANGEROUS_NON_SHORT_CIRCUIT
      See Also:
    • stage1

      int stage1
    • stage2

      int stage2
    • distance

      int distance
    • operator

      int operator
    • sawDanger

      boolean sawDanger
    • sawNullTestOld

      boolean sawNullTestOld
    • sawNullTestVeryOld

      boolean sawNullTestVeryOld
    • sawNullTest

      boolean sawNullTest
    • sawDangerOld

      boolean sawDangerOld
    • sawNumericTest

      boolean sawNumericTest
    • sawNumericTestOld

      boolean sawNumericTestOld
    • sawNumericTestVeryOld

      boolean sawNumericTestVeryOld
    • sawArrayDanger

      boolean sawArrayDanger
    • sawArrayDangerOld

      boolean sawArrayDangerOld
    • sawMethodCall

      boolean sawMethodCall
    • sawMethodCallOld

      boolean sawMethodCallOld
    • bugAccumulator

      private final BugAccumulator bugAccumulator
    • prevOpcode

      int prevOpcode
  • Constructor Details

    • FindNonShortCircuit

      public FindNonShortCircuit(BugReporter bugReporter)
  • Method Details

    • visit

      public void visit(org.apache.bcel.classfile.Method obj)
      Overrides:
      visit in class BetterVisitor
    • clearAll

      private void clearAll()
    • 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:
    • scanForDanger

      private void scanForDanger(int seen)
    • scanForShortCircuit

      private void scanForShortCircuit(int seen)
    • reportBug

      private void reportBug()
    • createBugInstance

      BugInstance createBugInstance()
    • scanForBooleanValue

      private void scanForBooleanValue(int seen)
    • sawBooleanValue

      private void sawBooleanValue()