Class BadSyntaxForRegularExpression

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

public class BadSyntaxForRegularExpression extends OpcodeStackDetector
  • Field Details

  • Constructor Details

    • BadSyntaxForRegularExpression

      public BadSyntaxForRegularExpression(BugReporter bugReporter)
  • Method Details

    • singleDotPatternWouldBeSilly

      private void singleDotPatternWouldBeSilly(int stackDepth, boolean ignorePasswordMasking)
    • sawRegExPattern

      private void sawRegExPattern(int stackDepth)
    • sawRegExPattern

      private void sawRegExPattern(int stackDepth, int flags)
    • getIntValue

      private int getIntValue(int stackDepth, int defaultValue)
      return an int on the stack, or 'defaultValue' if can't determine
    • 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:
    • appendOption

      static void appendOption(StringBuilder b, int flags, int mask, String name)
    • getOptions

      static String getOptions(int flags)