FSF GCC merge 02/23/03
[official-gcc.git] / libjava / testsuite / libjava.lang / initexc.java
blobeda24ab033f93ea7373da09875a58a0696641ffe
1 public class initexc
3 public static class fail
5 static
7 // Static initializers must be able to complete normally.
8 if (true)
9 throw new NullPointerException("nope");
12 public static int val ()
14 return 23;
18 public static void main (String[] args)
20 try
22 System.out.println (fail.val ());
24 catch (ExceptionInInitializerError _)
26 // Ok.
28 try
30 System.out.println (fail.val ());
32 catch (NoClassDefFoundError _)
34 // Ok.