aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0/libjava/testsuite/libjava.lang/Invoke_1.java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.0/libjava/testsuite/libjava.lang/Invoke_1.java')
-rw-r--r--gcc-4.4.0/libjava/testsuite/libjava.lang/Invoke_1.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.4.0/libjava/testsuite/libjava.lang/Invoke_1.java b/gcc-4.4.0/libjava/testsuite/libjava.lang/Invoke_1.java
new file mode 100644
index 000000000..bc4678301
--- /dev/null
+++ b/gcc-4.4.0/libjava/testsuite/libjava.lang/Invoke_1.java
@@ -0,0 +1,27 @@
+// 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");
+ }
+ }
+}