question: private static void expungeStaleExceptions ( ) { for ( Object x ; ( x = exceptionTableRefQueue . poll ( ) ) != null ; ) { if ( x instanceof ExceptionNode ) { ExceptionNode [ ] t = exceptionTable ; int i = ( ( ExceptionNode ) x ) . hashCode & ( t . length - 1 ) ; ExceptionNode e = t [ i ] ; ExceptionNode pred = null ; while ( e != null ) { ExceptionNode next = e . next ; if ( e == x ) { if ( pred == null ) t [ i ] = next ; else pred . next = next ; break ; } pred = e ; e = next ; } } } }
target:  Polls stale refs and removes them. Call only while holding lock.