diff options
author | Tom Tromey <tromey@redhat.com> | 2002-09-25 20:57:03 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-09-25 20:57:03 +0000 |
commit | 169f75f3846b0b292f5a7a6b4fddc1023c663ec6 (patch) | |
tree | 43e82772814712c2a3228d0a73999e5b18cc3b7f /libjava | |
parent | fd44a92df60208084fda548f0d2be237d25735e2 (diff) | |
download | gcc-169f75f3846b0b292f5a7a6b4fddc1023c663ec6.zip gcc-169f75f3846b0b292f5a7a6b4fddc1023c663ec6.tar.gz gcc-169f75f3846b0b292f5a7a6b4fddc1023c663ec6.tar.bz2 |
* java/lang/natClassLoader.cc:
(_Jv_PrepareCompiledClass): Throw NoClassDefFoundError, per spec.
* resolve.cc: Include NoClassDefFoundError.h, not
ClassNotFoundException.h.
(_Jv_ResolvePoolEntry): Throw NoClassDefFoundError, per spec.
* defineclass.cc: Don't include ClassNotFoundException.h.
From-SVN: r57516
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 7 | ||||
-rw-r--r-- | libjava/defineclass.cc | 1 | ||||
-rw-r--r-- | libjava/java/lang/natClassLoader.cc | 2 | ||||
-rw-r--r-- | libjava/resolve.cc | 5 |
4 files changed, 11 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2e5a412..b97f9d5 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,12 @@ 2002-09-25 Tom Tromey <tromey@redhat.com> + * java/lang/natClassLoader.cc: + (_Jv_PrepareCompiledClass): Throw NoClassDefFoundError, per spec. + * resolve.cc: Include NoClassDefFoundError.h, not + ClassNotFoundException.h. + (_Jv_ResolvePoolEntry): Throw NoClassDefFoundError, per spec. + * defineclass.cc: Don't include ClassNotFoundException.h. + * resolve.cc: Include StringBuffer. (_Jv_ResolvePoolEntry): Use StringBuffer to create error string. diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc index 95e671f..6a250da 100644 --- a/libjava/defineclass.cc +++ b/libjava/defineclass.cc @@ -35,7 +35,6 @@ details. */ #include <java/lang/ClassFormatError.h> #include <java/lang/NoClassDefFoundError.h> #include <java/lang/ClassCircularityError.h> -#include <java/lang/ClassNotFoundException.h> #include <java/lang/IncompatibleClassChangeError.h> #include <java/lang/reflect/Modifier.h> diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc index 9c83d59..d33614d 100644 --- a/libjava/java/lang/natClassLoader.cc +++ b/libjava/java/lang/natClassLoader.cc @@ -260,7 +260,7 @@ _Jv_PrepareCompiledClass (jclass klass) if (! found) { jstring str = _Jv_NewStringUTF (name->data); - throw new java::lang::ClassNotFoundException (str); + throw new java::lang::NoClassDefFoundError (str); } pool->data[index].clazz = found; diff --git a/libjava/resolve.cc b/libjava/resolve.cc index 90df67b..af1f7c6 100644 --- a/libjava/resolve.cc +++ b/libjava/resolve.cc @@ -29,7 +29,7 @@ details. */ #include <java/lang/ClassFormatError.h> #include <java/lang/IllegalAccessError.h> #include <java/lang/AbstractMethodError.h> -#include <java/lang/ClassNotFoundException.h> +#include <java/lang/NoClassDefFoundError.h> #include <java/lang/IncompatibleClassChangeError.h> #include <java/lang/reflect/Modifier.h> @@ -98,7 +98,8 @@ _Jv_ResolvePoolEntry (jclass klass, int index) if (! found) { jstring str = _Jv_NewStringUTF (name->data); - throw new java::lang::ClassNotFoundException (str); + // This exception is specified in JLS 2nd Ed, section 5.1. + throw new java::lang::NoClassDefFoundError (str); } if ((found->accflags & Modifier::PUBLIC) == Modifier::PUBLIC |