initexc.java: New file.

* libjava.lang/initexc.java: New file.
	* libjava.lang/initexc.out: New file.

From-SVN: r58761
This commit is contained in:
Tom Tromey 2002-11-02 23:36:47 +00:00 committed by Tom Tromey
parent 8cd4a35974
commit 2640ad1110
3 changed files with 40 additions and 0 deletions

View File

@ -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:

View File

@ -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.
}
}
}