private void flush ( ) { if ( pendingAbsoluteValueBug != null ) { absoluteValueAccumulator . accumulateBug ( pendingAbsoluteValueBug , pendingAbsoluteValueBugSourceLine ) ; pendingAbsoluteValueBug = null ; pendingAbsoluteValueBugSourceLine = null ; } accumulator . reportAccumulatedBugs ( ) ; if ( sawLoadOfMinValue ) { absoluteValueAccumulator . clearBugs ( ) ; } else { absoluteValueAccumulator . reportAccumulatedBugs ( ) ; } if ( gcInvocationBugReport != null && ! sawCurrentTimeMillis ) { // Make sure the GC invocation is not in an exception handler // for OutOfMemoryError. boolean outOfMemoryHandler = false ; for ( CodeException handler : exceptionTable ) { if ( gcInvocationPC < handler . getHandlerPC ( ) || gcInvocationPC > handler . getHandlerPC ( ) + OOM_CATCH_LEN ) { continue ; } int catchTypeIndex = handler . getCatchType ( ) ; if ( catchTypeIndex > 0 ) { ConstantPool cp = getThisClass ( ) . getConstantPool ( ) ; Constant constant = cp . getConstant ( catchTypeIndex ) ; if ( constant instanceof ConstantClass ) { String exClassName = ( String ) ( ( ConstantClass ) constant ) . getConstantValue ( cp ) ; if ( "java/lang/OutOfMemoryError" . equals ( exClassName ) ) { outOfMemoryHandler = true ; break ; } } } } if ( ! outOfMemoryHandler ) { bugReporter . reportBug ( gcInvocationBugReport ) ; } } sawCurrentTimeMillis = false ; gcInvocationBugReport = null ; exceptionTable = null ; }
Flush out cached state at the end of a method .