ClassLoader.java (loadClass): Resolve class even if it was already found.
* java/lang/ClassLoader.java (loadClass): Resolve class even if it was already found. From-SVN: r97565
This commit is contained in:
parent
d4e1591f4a
commit
6a5d24d70d
|
@ -1,3 +1,8 @@
|
|||
2005-04-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/lang/ClassLoader.java (loadClass): Resolve class even if
|
||||
it was already found.
|
||||
|
||||
2005-04-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/net/URL.java (DEFAULT_SEARCH_PATH): Added
|
||||
|
|
|
@ -285,28 +285,28 @@ public abstract class ClassLoader
|
|||
{
|
||||
// Have we already loaded this class?
|
||||
Class c = findLoadedClass(name);
|
||||
if (c != null)
|
||||
return c;
|
||||
|
||||
// Can the class be loaded by a parent?
|
||||
try
|
||||
if (c == null)
|
||||
{
|
||||
if (parent == null)
|
||||
// Can the class be loaded by a parent?
|
||||
try
|
||||
{
|
||||
c = VMClassLoader.loadClass(name, resolve);
|
||||
if (c != null)
|
||||
return c;
|
||||
if (parent == null)
|
||||
{
|
||||
c = VMClassLoader.loadClass(name, resolve);
|
||||
if (c != null)
|
||||
return c;
|
||||
}
|
||||
else
|
||||
{
|
||||
return parent.loadClass(name, resolve);
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
return parent.loadClass(name, resolve);
|
||||
}
|
||||
// Still not found, we have to do it ourself.
|
||||
c = findClass(name);
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
}
|
||||
// Still not found, we have to do it ourself.
|
||||
c = findClass(name);
|
||||
if (resolve)
|
||||
resolveClass(c);
|
||||
return c;
|
||||
|
|
Loading…
Reference in New Issue