Revision: 17767
          http://sourceforge.net/p/gate/code/17767
Author:   markagreenwood
Date:     2014-04-03 12:28:33 +0000 (Thu, 03 Apr 2014)
Log Message:
-----------
make sure we check the cache before looking elsewhere

Modified Paths:
--------------
    gate/trunk/src/main/gate/util/GateClassLoader.java

Modified: gate/trunk/src/main/gate/util/GateClassLoader.java
===================================================================
--- gate/trunk/src/main/gate/util/GateClassLoader.java  2014-04-03 11:31:19 UTC 
(rev 17766)
+++ gate/trunk/src/main/gate/util/GateClassLoader.java  2014-04-03 12:28:33 UTC 
(rev 17767)
@@ -152,6 +152,14 @@
   private Class<?> loadClass(String name, boolean resolve, boolean localOnly,
       Set<GateClassLoader> visited) throws ClassNotFoundException {
 
+    Class<?> previous = findLoadedClass(name);
+    
+    if (previous != null) {
+      if (DEBUG) System.out.println("CACHE HIT: " + name + " -- " + id);
+      
+      return previous;
+    }
+    
     if(DEBUG)
       System.out.println(name + " -- " + id + ": " + localOnly + "/" + isolated
           + "/" + getParent());

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to