Author: remm
Date: Wed Feb 21 06:48:39 2007
New Revision: 510041

URL: http://svn.apache.org/viewvc?view=rev&rev=510041
Log:
- (quick fix) findClassInternal may loop so the fancy syncing probably cannot 
work.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?view=diff&rev=510041&r1=510040&r2=510041
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
Wed Feb 21 06:48:39 2007
@@ -1763,7 +1763,7 @@
         if (clazz != null)
             return clazz;
 
-        synchronized (entry) {
+        synchronized (this) {
             if (entry.binaryContent == null && entry.loadedClass == null)
                 throw new ClassNotFoundException(name);
 
@@ -1776,11 +1776,10 @@
             Package pkg = null;
         
             if (packageName != null) {
-                synchronized (this) {
-                    pkg = getPackage(packageName);
-            
-                    // Define the package (if null)
-                    if (pkg == null) {
+                pkg = getPackage(packageName);
+                // Define the package (if null)
+                if (pkg == null) {
+                    try {
                         if (entry.manifest == null) {
                             definePackage(packageName, null, null, null, null,
                                     null, null, null);
@@ -1788,7 +1787,10 @@
                             definePackage(packageName, entry.manifest,
                                     entry.codeBase);
                         }
+                    } catch (IllegalArgumentException e) {
+                        // Ignore: normal error due to dual definition of 
package
                     }
+                    pkg = getPackage(packageName);
                 }
             }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to