You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2007/02/21 15:48:39 UTC
svn commit: r510041 -
/tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org