@ Override public void visitCode ( Code obj ) { try { Method method = getMethod ( ) ; if ( method . isSynthetic ( ) ) { return ; } isBooleanMethod = Type . BOOLEAN . equals ( method . getReturnType ( ) ) ; if ( isBooleanMethod || prescreen ( method ) ) { catchHandlerPCs = collectExceptions ( obj . getExceptionTable ( ) ) ; if ( ! catchHandlerPCs . isEmpty ( ) ) { stack . resetForMethodEntry ( this ) ; catchInfos = new ArrayList <> ( ) ; lvt = method . getLocalVariableTable ( ) ; constrainingInfo = null ; hasValidFalseReturn = false ; catchFalseReturnPC = - 1 ; super . visitCode ( obj ) ; if ( ! hasValidFalseReturn && ( catchFalseReturnPC >= 0 ) && ! method . getName ( ) . startsWith ( "is" ) ) { bugReporter . reportBug ( new BugInstance ( this , BugType . EXS_EXCEPTION_SOFTENING_RETURN_FALSE . name ( ) , NORMAL_PRIORITY ) . addClass ( this ) . addMethod ( this ) . addSourceLine ( this , catchFalseReturnPC ) ) ; } } } } finally { catchInfos = null ; catchHandlerPCs = null ; lvt = null ; constrainingInfo = null ; } }
overrides the visitor to look for methods that catch checked exceptions and rethrow runtime exceptions