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
      • 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
      • isBranchTargetAfterNextCaseOffset

        public boolean isBranchTargetAfterNextCaseOffset()
        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.
        Returns:
        true if the branch target is after the next switch offset as it is the case for a switch break.
      • clearAllDeadStores

        private void clearAllDeadStores()
      • hasFallThruComment

        private boolean hasFallThruComment​(int startPC,
                                           int endPC)