Class InheritanceUnsafeGetResource

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

public class InheritanceUnsafeGetResource extends BytecodeScanningDetector implements StatelessDetector
  • Field Details

    • bugReporter

      private final BugReporter bugReporter
    • classIsFinal

      private boolean classIsFinal
    • classIsVisibleToOtherPackages

      private boolean classIsVisibleToOtherPackages
    • methodIsStatic

      private boolean methodIsStatic
    • state

      int state
    • sawGetClass

      int sawGetClass
    • reportedForThisClass

      boolean reportedForThisClass
    • stringConstant

      String stringConstant
    • prevOpcode

      int prevOpcode
  • Constructor Details

    • InheritanceUnsafeGetResource

      public InheritanceUnsafeGetResource(BugReporter bugReporter)
  • Method Details

    • visit

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

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

      public void sawOpcode(int seen)
      Overrides:
      sawOpcode in class DismantleBytecode
    • adjustPriority

      private int adjustPriority(int priority)
      Adjust the priority of a warning about to be reported.
      Parameters:
      priority - initial priority
      Returns:
      adjusted priority