re PR libgcj/26103 (Wrong exception thrown)
PR libgcj/26103: * java/lang/ClassLoader.java (loadClass): Don't throw StringIndexOutOfBoundsException if name is empty. * java/lang/natClassLoader.cc (loadClassFromSig): Throw exception if class not found. From-SVN: r111820
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* ClassLoader.java -- responsible for loading classes into the VM
|
||||
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
@@ -288,7 +288,7 @@ public abstract class ClassLoader
|
||||
{
|
||||
// Arrays are handled specially.
|
||||
Class c;
|
||||
if (name.charAt(0) == '[')
|
||||
if (name.length() > 0 && name.charAt(0) == '[')
|
||||
c = loadClassFromSig(name);
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user