mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-18 21:59:35 +08:00
ee9dd3721b
From-SVN: r26263
28 lines
392 B
Java
28 lines
392 B
Java
// Test of failing method invocation.
|
|
|
|
public class Invoke_1
|
|
{
|
|
public void call_me ()
|
|
{
|
|
System.out.println ("no");
|
|
}
|
|
|
|
public static Invoke_1 get_i ()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public static void main (String[] args)
|
|
{
|
|
Invoke_1 i = get_i ();
|
|
try
|
|
{
|
|
i.call_me ();
|
|
}
|
|
catch (NullPointerException ok)
|
|
{
|
|
System.out.println ("ok");
|
|
}
|
|
}
|
|
}
|