URLClassLoader.java (addURLImpl): Synchronize on the loader.
authorAndrew Haley <aph@redhat.com>
Fri, 9 Sep 2005 13:06:24 +0000 (13:06 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Fri, 9 Sep 2005 13:06:24 +0000 (13:06 +0000)
2005-09-08  Andrew Haley  <aph@redhat.com>

* java/net/URLClassLoader.java (addURLImpl): Synchronize on the
loader.
(toString): Likewise.

From-SVN: r104095

libjava/ChangeLog
libjava/java/net/URLClassLoader.java

index a167ac4c8c6f66da6b7f12aec79eb63a34855a41..3d05cf8f30f33fbbee068436d493bd07f1afcbd1 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-08  Andrew Haley  <aph@redhat.com>
+
+       * java/net/URLClassLoader.java (addURLImpl): Synchronize on the
+       loader.
+       (toString): Likewise.
+
 2005-09-08  Andrew Haley  <aph@redhat.com>
 
        PR java/22084
index 5d78db6606cfae24e07adc1f3ef86a3a01af7c10..9f7126dc54009d9e08fee8fb521c0bca3a2e3928 100644 (file)
@@ -880,7 +880,7 @@ public class URLClassLoader extends SecureClassLoader
 
   private void addURLImpl(URL newUrl)
   {
-    synchronized (urlloaders)
+    synchronized (this)
       {
         if (newUrl == null)
           return; // Silently ignore...
@@ -1111,7 +1111,7 @@ public class URLClassLoader extends SecureClassLoader
    */
   public String toString()
   {
-    synchronized (urlloaders)
+    synchronized (this)
       {
        if (thisString == null)
          {