Permalink
Browse files

disable don't-recompile-if-same-source in DynamicClassLoader, fixes #353

  • Loading branch information...
1 parent d694d6d commit f47b3d6f028e0370c495383731a449092d0ae451 @richhickey richhickey committed Jun 1, 2010
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/jvm/clojure/lang/DynamicClassLoader.java
@@ -39,16 +39,16 @@ public DynamicClassLoader(ClassLoader parent){
}
public Class defineClass(String name, byte[] bytes, Object srcForm){
- Map.Entry<WeakReference<Class>,Object> ce = classCache.get(name);
- if(ce != null)
- {
- WeakReference<Class> cr = ce.getKey();
- Class c = cr.get();
- if((c != null) && srcForm.equals(ce.getValue()))
- return c;
- }
+// Map.Entry<WeakReference<Class>,Object> ce = classCache.get(name);
+// if(ce != null)
+// {
+// WeakReference<Class> cr = ce.getKey();
+// Class c = cr.get();
+// if((c != null) && srcForm.equals(ce.getValue()))
+// return c;
+// }
Class c = defineClass(name, bytes, 0, bytes.length);
- classCache.put(name, new MapEntry(new WeakReference(c), srcForm));
+ classCache.put(name, new MapEntry(new WeakReference(c), null));
return c;
}

0 comments on commit f47b3d6

Please sign in to comment.