initexc.java (fail): Static initializers must be able to complete normally.
authorTom Tromey <tromey@redhat.com>
Sun, 3 Nov 2002 01:30:28 +0000 (01:30 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sun, 3 Nov 2002 01:30:28 +0000 (01:30 +0000)
* libjava.lang/initexc.java (fail): Static initializers must be
able to complete normally.  From Eric Blake.

From-SVN: r58765

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.lang/initexc.java

index 64f59c58a206302653738b1f0e8bb65fafc0f1f0..fc5627b34f4e50793a2108881b94c38a10a2eb12 100644 (file)
@@ -1,5 +1,8 @@
 2002-11-02  Tom Tromey  <tromey@redhat.com>
 
+       * libjava.lang/initexc.java (fail): Static initializers must be
+       able to complete normally.  From Eric Blake.
+
        * libjava.lang/initexc.java: New file.
        * libjava.lang/initexc.out: New file.
 
index 968009e45e1e8b43b878a015c19423501ac4b48d..eda24ab033f93ea7373da09875a58a0696641ffe 100644 (file)
@@ -4,7 +4,9 @@ public class initexc
   {
     static
     {
-      throw new NullPointerException("nope");
+      // Static initializers must be able to complete normally.
+      if (true)
+       throw new NullPointerException("nope");
     }
 
     public static int val ()