* java/lang/ClassLoader.java (findLoadedClass): Now synchronized.

From-SVN: r60053
This commit is contained in:
Tom Tromey 2002-12-12 00:58:39 +00:00 committed by Tom Tromey
parent a625dfab90
commit 70eec35875
2 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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);
}