Skip to content

Commit 167a738

Browse files
committed
don't rely on softref queue, explicitly remove dead entry when found, fixes #444
1 parent cc8372f commit 167a738

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/jvm/clojure/lang/DynamicClassLoader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ protected Class<?> findClass(String name) throws ClassNotFoundException{
5454
Class c = cr.get();
5555
if(c != null)
5656
return c;
57+
else
58+
classCache.remove(name, cr);
5759
}
5860
return super.findClass(name);
5961
}

src/jvm/clojure/lang/Keyword.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public static Keyword intern(Symbol sym){
3636
if(existingk != null)
3737
return existingk;
3838
//entry died in the interim, do over
39+
table.remove(sym, existingRef);
3940
return intern(sym);
4041
}
4142

0 commit comments

Comments
 (0)