Class SwitchFallthrough

    • Field Detail

      • DEBUG

        private static final boolean DEBUG
      • LOOK_IN_SOURCE_FOR_FALLTHRU_COMMENT

        private static final boolean LOOK_IN_SOURCE_FOR_FALLTHRU_COMMENT
      • reachable

        private boolean reachable
      • lastPC

        private int lastPC
      • biggestJumpTarget

        private int biggestJumpTarget
      • potentiallyDeadStores

        private final java.util.BitSet potentiallyDeadStores
      • potentiallyDeadFields

        private final java.util.Set<XField> potentiallyDeadFields
      • potentiallyDeadStoresFromBeforeFallthrough

        private java.util.BitSet potentiallyDeadStoresFromBeforeFallthrough
      • potentiallyDeadFieldsFromBeforeFallthrough

        private java.util.Set<XField> potentiallyDeadFieldsFromBeforeFallthrough
      • priority

        private int priority
      • branchTargetsByPc

        private final java.util.TreeMap<java.lang.Integer,​java.lang.Integer> branchTargetsByPc
      • justSawHashcode

        boolean justSawHashcode
    • Constructor Detail

      • SwitchFallthrough

        public SwitchFallthrough​(BugReporter bugReporter)
    • Method Detail

      • visit

        public void visit​(org.apache.bcel.classfile.Code obj)
        Overrides:
        visit in class DismantleBytecode
      • isBranchTargetOutsideOfNextCase

        public boolean isBranchTargetOutsideOfNextCase()
        A GOTO might correspond to a break or to a do/while/for loop. For loops the branch target will be before the offset of the next case, for breaks we're exiting the switch so the target is actually even after the end of the last case. The branch target might be before the switch when we're inside another structure such as a loop.
      • clearAllDeadStores

        private void clearAllDeadStores()
      • hasFallThruComment

        private boolean hasFallThruComment​(int startPC,
                                           int endPC)