public static Throwable checkInterrupted(Throwable e){
  if (e instanceof InterruptedException)   Thread.interrupted();
  return e;
}

public static Throwable checkInterrupted ( Throwable e ) { if ( e instanceof InterruptedException ) Thread . interrupted ( ) ; return e ; }
check to see if a throwable is an interruptedexception , and if it is , set the thread interrupt flag
