From: aclement Date: Thu, 14 Jun 2007 13:33:48 +0000 (+0000) Subject: allow for entries not getting into the ref queue quick enough X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b2ecc43513b88661a2cc159c0d6708b0fe7784fe;p=aspectj.git allow for entries not getting into the ref queue quick enough --- diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java index 3b27934ca..2774dc16c 100644 --- a/weaver/src/org/aspectj/weaver/World.java +++ b/weaver/src/org/aspectj/weaver/World.java @@ -856,20 +856,15 @@ public abstract class World implements Dump.INode { private void processQueue() { KeyedValue sv = null; while ((sv = (KeyedValue)rq.poll())!=null) { - map.remove(sv.key); + Object o = map.get(sv.key); + if(o == sv) map.remove(sv.key); } } public Object get(Object key) { KeyedValue value = (KeyedValue)map.get(key); if (value==null) return null; - if (value.get()==null) { - // it got GC'd - map.remove(value.key); - return null; - } else { - return value.get(); - } + return value.get(); } public Object put(Object k, Object v) {