public static CloseWatcher pollUnclosed(){
  ReferenceQueue<Object> q=queue;
  if (q == null) {
    return null;
  }
  while (true) {
    CloseWatcher cw=(CloseWatcher)q.poll();
    if (cw == null) {
      return null;
    }
    if (refs != null) {
      refs.remove(cw);
    }
    if (cw.closeable != null) {
      return cw;
    }
  }
}

public static CloseWatcher pollUnclosed ( ) { ReferenceQueue < Object > q = queue ; if ( q == null ) { return null ; } while ( true ) { CloseWatcher cw = ( CloseWatcher ) q . poll ( ) ; if ( cw == null ) { return null ; } if ( refs != null ) { refs . remove ( cw ) ; } if ( cw . closeable != null ) { return cw ; } } }
check for an collected object .
