Class FindAssertionsWithSideEffects

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

    public class FindAssertionsWithSideEffects
    extends AbstractAssertDetector
    This detector can find assertions that violate the EXP06 rule.
    • Constructor Detail

      • FindAssertionsWithSideEffects

        public FindAssertionsWithSideEffects​(BugReporter bugReporter)
    • Method Detail

      • isMethodCall

        private boolean isMethodCall​(int seen)
        Returns true if the opcode is a method invocation false otherwise
      • checkSeen

        private boolean checkSeen​(int seen)
        Returns true if the opcode is a side effect producing instruction
      • detect

        protected void detect​(int seen)
        Finds assertion with possible side effect
        Specified by:
        detect in class AbstractAssertDetector