* Ok, now the test is correct
authortwisti <none@none>
Tue, 19 Jul 2005 08:51:41 +0000 (08:51 +0000)
committertwisti <none@none>
Tue, 19 Jul 2005 08:51:41 +0000 (08:51 +0000)
tests/regression/clinitexception.2output [new file with mode: 0644]
tests/regression/clinitexception.java

diff --git a/tests/regression/clinitexception.2output b/tests/regression/clinitexception.2output
new file mode 100644 (file)
index 0000000..1226ae4
--- /dev/null
@@ -0,0 +1,4 @@
+Exception in thread "main" java.lang.ExceptionInInitializerError
+       <<No stacktrace available>>
+Caused by: java.lang.RuntimeException
+       at clinitexception.<clinit>(clinitexception.java:3)
index 6153a8f39b8f748e251392a09555ce816a5926e5..aa75bc49851c1c9a24e5920cee592e728067bf3f 100644 (file)
@@ -1,17 +1,9 @@
 public class clinitexception {
-    static class ThrowRuntimeException {
-        static {
-            if (true)
-                throw new RuntimeException();
-        }
+    static {
+        if (true)
+            throw new RuntimeException();
     }
 
     public static void main(String[] argv) {
-        try {
-            new ThrowRuntimeException();
-            System.out.println("FAILED");
-        } catch (ExceptionInInitializerError e) {
-            System.out.println("OK");
-        }
     }
 }