Fixes bug libgcj/8170
Fixes bug libgcj/8170 * java/lang/ClassLoader.java (loadClass): Don't rewrap ClassNotFoundException. * gnu/java/lang/MainThread.java (run): Chain NoClassDefFoundError. * gnu/gcj/runtime/NameFinder.java (remove_interpreter): Removed. (remove_internal): New field superceding remove_interpreter. (sanitizeStack): Remove all no-package classes starting with "_Jv_". Remove no-class methods starting with "_Jv_". And Replace null class or method names with the empty string. Stop at either the MainThread or a real Thread run() method. (newElement): Made static. * java/net/URLClassLoader.java (findClass): Throw ClassNotFoundExceptions including urls, plus parent using toString(). (thisString): New field. (toString): New method. From-SVN: r94935
This commit is contained in:
parent
8ad833acc4
commit
0008978072
5 changed files with 110 additions and 43 deletions
|
@ -288,8 +288,6 @@ public abstract class ClassLoader
|
|||
if (c != null)
|
||||
return c;
|
||||
|
||||
ClassNotFoundException ex = null;
|
||||
|
||||
// Can the class be loaded by a parent?
|
||||
try
|
||||
{
|
||||
|
@ -306,20 +304,9 @@ public abstract class ClassLoader
|
|||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
ex = e;
|
||||
}
|
||||
// Still not found, we have to do it ourself.
|
||||
try
|
||||
{
|
||||
c = findClass(name);
|
||||
}
|
||||
catch (ClassNotFoundException cause)
|
||||
{
|
||||
if (ex != null)
|
||||
throw new ClassNotFoundException(ex.toString(), cause);
|
||||
else
|
||||
throw cause;
|
||||
}
|
||||
c = findClass(name);
|
||||
if (resolve)
|
||||
resolveClass(c);
|
||||
return c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue