remm 2002/06/15 07:42:29
Modified: catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
Log:
- Tweak the syncing.
- This is supposed to fix a rare out of bounds exception (the array on
which the sync was done was mutated inside the method body).
- Patch submitted by Arvind Srinivasan <arvind.srinivasan at sun.com>
Revision Changes Path
1.42 +7 -6
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
Index: WebappClassLoader.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- WebappClassLoader.java 9 Jun 2002 01:16:11 -0000 1.41
+++ WebappClassLoader.java 15 Jun 2002 14:42:29 -0000 1.42
@@ -1735,7 +1735,8 @@
}
// Register the full path for modification checking
- synchronized (paths) {
+ // Note: Only syncing on a 'constant' object is needed
+ synchronized (allPermission) {
int j;
@@ -1833,7 +1834,7 @@
}
// Add the entry in the local resource repository
- synchronized (this) {
+ synchronized (resourceEntries) {
// Ensures that all the threads which may be in a race to load
// a particular class all end up with the same ResourceEntry
// instance
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>