You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ay...@apache.org on 2007/03/06 16:14:10 UTC

svn commit: r515140 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java

Author: ayza
Date: Tue Mar  6 07:14:09 2007
New Revision: 515140

URL: http://svn.apache.org/viewvc?view=rev&rev=515140
Log:
Applying another patch from HARMONY-2982 ([classlib][net ] java.net.URLClassLoader implementation is not thread safe.)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java?view=diff&rev=515140&r1=515139&r2=515140
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java Tue Mar  6 07:14:09 2007
@@ -711,7 +711,10 @@
                     String protocol = currentUrl.getProtocol();
                     if (protocol.equals("jar")) { //$NON-NLS-1$
                         jf = resCache.get(currentUrl);
-                        if ((jf == null) && (!invalidUrls.contains(currentUrl))) {
+                        if (jf == null) {
+                            if (invalidUrls.contains(currentUrl)) {
+                                continue;
+                            }
                             // each jf should be found only once 
                             // so we do this job in the synchronized block
                             synchronized (lock) {