private void expungeStaleEntries(){
  for (Object x; (x=queue.poll()) != null; ) {
synchronized (queue) {
      @SuppressWarnings("unchecked") Entry<K,V> e=(Entry<K,V>)x;
      int i=indexFor(e.hash,table.length);
      Entry<K,V> prev=table[i];
      Entry<K,V> p=prev;
      while (p != null) {
        Entry<K,V> next=p.next;
        if (p == e) {
          if (prev == e)           table[i]=next;
 else           prev.next=next;
          e.value=null;
          size--;
          break;
        }
        prev=p;
        p=next;
      }
    }
  }
}

private void expungeStaleEntries ( ) { for ( Object x ; ( x = queue . poll ( ) ) != null ; ) { synchronized ( queue ) { @ SuppressWarnings ( "unchecked" ) Entry < K , V > e = ( Entry < K , V > ) x ; int i = indexFor ( e . hash , table . length ) ; Entry < K , V > prev = table [ i ] ; Entry < K , V > p = prev ; while ( p != null ) { Entry < K , V > next = p . next ; if ( p == e ) { if ( prev == e ) table [ i ] = next ; else prev . next = next ; e . value = null ; size -- ; break ; } prev = p ; p = next ; } } } }
expunges stale entries from the table .
