Class SuperfluousInstanceOf

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

public class SuperfluousInstanceOf extends BytecodeScanningDetector implements StatelessDetector
Find occurrences of a instanceof b where it can be determined statically whether this is true or false. This may signal a misunderstanding of the inheritance hierarchy in use, and potential bugs.
  • Field Details

    • SEEN_NOTHING

      private static final int SEEN_NOTHING
      See Also:
    • SEEN_ALOAD

      private static final int SEEN_ALOAD
      See Also:
    • bugReporter

      private final BugReporter bugReporter
    • varTable

      private org.apache.bcel.classfile.LocalVariableTable varTable
    • state

      private int state
    • register

      private int register
  • Constructor Details

    • SuperfluousInstanceOf

      public SuperfluousInstanceOf(BugReporter bugReporter)
  • Method Details