initexc.java: New file.
* libjava.lang/initexc.java: New file. * libjava.lang/initexc.out: New file. From-SVN: r58761
This commit is contained in:
parent
8cd4a35974
commit
2640ad1110
|
@ -1,3 +1,8 @@
|
|||
2002-11-02 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* libjava.lang/initexc.java: New file.
|
||||
* libjava.lang/initexc.out: New file.
|
||||
|
||||
2002-11-01 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
For PR java/8415:
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
public class initexc
|
||||
{
|
||||
public static class fail
|
||||
{
|
||||
static
|
||||
{
|
||||
throw new NullPointerException("nope");
|
||||
}
|
||||
|
||||
public static int val ()
|
||||
{
|
||||
return 23;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main (String[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.out.println (fail.val ());
|
||||
}
|
||||
catch (ExceptionInInitializerError _)
|
||||
{
|
||||
// Ok.
|
||||
}
|
||||
try
|
||||
{
|
||||
System.out.println (fail.val ());
|
||||
}
|
||||
catch (NoClassDefFoundError _)
|
||||
{
|
||||
// Ok.
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue