* exceptions_init: Load and link class_java_lang_NullPointerException.
authortwisti <none@none>
Wed, 26 Oct 2005 16:42:22 +0000 (16:42 +0000)
committertwisti <none@none>
Wed, 26 Oct 2005 16:42:22 +0000 (16:42 +0000)
* new_nullpointerexception: Use native_new_and_init instead of
  new_exception.

src/vm/exceptions.c

index a9c5e9af4482f354e47a6e7421dc3ebc3945f715..da8cb68c5c6923b6d4ddb0ac93f3cbd7a9d4bbc2 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: exceptions.c 3466 2005-10-20 10:42:12Z edwin $
+   $Id: exceptions.c 3498 2005-10-26 16:42:22Z twisti $
 
 */
 
@@ -129,6 +129,13 @@ bool exceptions_init(void)
                !link_class(class_java_lang_IllegalArgumentException))
                return false;
 
+       /* java/lang/NullPointerException */
+
+       if (!(class_java_lang_NullPointerException =
+                 load_class_bootstrap(utf_java_lang_NullPointerException)) ||
+               !link_class(class_java_lang_NullPointerException))
+               return false;
+
 
        return true;
 }
@@ -766,6 +773,7 @@ java_objectheader *new_arraystoreexception(void)
        java_objectheader *e;
 
        e = new_exception(string_java_lang_ArrayStoreException);
+/*     e = native_new_and_init(class_java_lang_ArrayStoreException); */
 
        if (!e)
                return *exceptionptr;
@@ -839,7 +847,7 @@ java_objectheader *new_nullpointerexception(void)
 {
        java_objectheader *e;
 
-       e = new_exception(string_java_lang_NullPointerException);
+       e = native_new_and_init(class_java_lang_NullPointerException);
 
        if (!e)
                return *exceptionptr;