aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/Throw_2.java
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2016-09-30 16:24:48 +0000
committerAndrew Haley <aph@gcc.gnu.org>2016-09-30 16:24:48 +0000
commit07b78716af6a9d7c9fd1e94d9baf94a52c873947 (patch)
tree3f22b3241c513ad168c8353805614ae1249410f4 /libjava/testsuite/libjava.lang/Throw_2.java
parenteae993948bae8b788c53772bcb9217c063716f93 (diff)
downloadgcc-07b78716af6a9d7c9fd1e94d9baf94a52c873947.zip
gcc-07b78716af6a9d7c9fd1e94d9baf94a52c873947.tar.gz
gcc-07b78716af6a9d7c9fd1e94d9baf94a52c873947.tar.bz2
Makefile.def: Remove libjava.
2016-09-30 Andrew Haley <aph@redhat.com> * Makefile.def: Remove libjava. * Makefile.tpl: Likewise. * Makefile.in: Regenerate. * configure.ac: Likewise. * configure: Likewise. * gcc/java: Remove. * libjava: Likewise. From-SVN: r240662
Diffstat (limited to 'libjava/testsuite/libjava.lang/Throw_2.java')
-rw-r--r--libjava/testsuite/libjava.lang/Throw_2.java59
1 files changed, 0 insertions, 59 deletions
diff --git a/libjava/testsuite/libjava.lang/Throw_2.java b/libjava/testsuite/libjava.lang/Throw_2.java
deleted file mode 100644
index 6d1d0e6..0000000
--- a/libjava/testsuite/libjava.lang/Throw_2.java
+++ /dev/null
@@ -1,59 +0,0 @@
-// Check that NullPointerExceptions thrown from library code are
-// caught. This detects a number of failures that can be caused by
-// libgcj being built incorrectly. In particular, we ensure that a
-// SEGV in native (i.e. C++) code in libgcj is handled correctly.
-
-// Regrettably, we cannot guarantee that Double.parseDouble() will
-// always be native code, or that it will never be inlined. It could
-// be argued that we should add a method to libgcj that will be
-// guaranteed forever to be native, but I'm reluctant to add to the
-// library for the sole purpose of performing this test.
-
-public class Throw_2
-{
- public static Throwable obj()
- {
- return null;
- }
-
- public static String str()
- {
- return null;
- }
-
- static double d;
-
- public static void main (String[] args)
- {
- // This NullPointerException will, at the time of writing, be
- // thrown from Java code in libgcj.
- try
- {
- java.util.Vector v = new java.util.Vector (null);
- System.out.println ("fail: no exception thrown");
- }
- catch (NullPointerException _)
- {
- System.out.println ("1");
- }
- catch (Throwable _)
- {
- System.out.println ("fail: " + _);
- }
- // This one will, at the time of writing, be thrown from C++
- // code in libgcj.
- try
- {
- d = Double.parseDouble(str());
- System.out.println ("fail: no exception thrown");
- }
- catch (NullPointerException _)
- {
- System.out.println ("2");
- }
- catch (Throwable _)
- {
- System.out.println ("fail: " + _);
- }
- }
-}