diff options
author | Tom Tromey <tromey@redhat.com> | 2002-12-12 00:58:39 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-12-12 00:58:39 +0000 |
commit | 70eec35875d228e7fe637ca38e2b0cf254e797be (patch) | |
tree | fb59d623cf84badcb60a6aff88c30899dcf8737b /libjava | |
parent | a625dfab906c2598dad08d6b8a0cca2cd8b0bf5f (diff) | |
download | gcc-70eec35875d228e7fe637ca38e2b0cf254e797be.zip gcc-70eec35875d228e7fe637ca38e2b0cf254e797be.tar.gz gcc-70eec35875d228e7fe637ca38e2b0cf254e797be.tar.bz2 |
* java/lang/ClassLoader.java (findLoadedClass): Now synchronized.
From-SVN: r60053
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 2 | ||||
-rw-r--r-- | libjava/java/lang/ClassLoader.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index af421ed..203230b 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,7 @@ 2002-12-11 Tom Tromey <tromey@redhat.com> + * java/lang/ClassLoader.java (findLoadedClass): Now synchronized. + * java/lang/ClassLoader.java (loadedClasses): New field. (defineClass): Fixed indentation. Put new class in loadedClasses. diff --git a/libjava/java/lang/ClassLoader.java b/libjava/java/lang/ClassLoader.java index 00cf011..99acac6 100644 --- a/libjava/java/lang/ClassLoader.java +++ b/libjava/java/lang/ClassLoader.java @@ -450,7 +450,7 @@ public abstract class ClassLoader + "are meaningless"); // as per 5.3.5.1 - if (name != null && findLoadedClass (name) != null) + if (name != null && findLoadedClass (name) != null) throw new java.lang.LinkageError ("class " + name + " already loaded"); @@ -731,7 +731,7 @@ public abstract class ClassLoader * @param name class to find. * @return the class loaded, or null. */ - protected final Class findLoadedClass(String name) + protected final synchronized Class findLoadedClass(String name) { return (Class) loadedClasses.get(name); } |