modules/ejbca-entity/src/org/jboss/invocation/ReferenceValueMap.java
/**
    * Remove all entries whose values have been discarded.
    */
Remove all entries whose values have been discarded.
Remove all entries whose values have been discarded .
@SuppressWarnings("unchecked")
   private void processQueue()
   {
      ValueRef<K, V> ref = (ValueRef<K, V>) queue.poll();
      while (ref != null)
      {
         if (ref == map.get(ref.getKey()))
            map.remove(ref.getKey());
         ref = (ValueRef<K, V>) queue.poll();
      }
   }
@ SuppressWarnings ( "unchecked" ) private void processQueue ( ) { ValueRef < K , V > ref = ( ValueRef < K , V > ) queue . poll ( ) ; while ( ref != null ) { if ( ref == map . get ( ref . getKey ( ) ) ) map . remove ( ref . getKey ( ) ) ; ref = ( ValueRef < K , V > ) queue . poll ( ) ; } }
Remove all entries whose values have been discarded.
Remove all entries whose values have been discarded .
// only remove if it is the *exact* same WeakValueRef