aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/stacktrace.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/stacktrace.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/stacktrace.java')
-rw-r--r--libjava/testsuite/libjava.lang/stacktrace.java67
1 files changed, 0 insertions, 67 deletions
diff --git a/libjava/testsuite/libjava.lang/stacktrace.java b/libjava/testsuite/libjava.lang/stacktrace.java
deleted file mode 100644
index f8823a1..0000000
--- a/libjava/testsuite/libjava.lang/stacktrace.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* This test should test the stacktrace functionality.
- We only print ClassName and MethName since the other information
- like FileName and LineNumber are not consistent while building
- native or interpreted and we want to test the output inside the dejagnu
- test environment.
- Also, we have to make the methods public since they might be optimized away
- with inline's and then the -O3/-O2 execution might fail.
-*/
-public class stacktrace {
- public static void main(String args[]) {
- try {
- new stacktrace().a();
- } catch (TopException e) {
- }
- }
-
- public void a() throws TopException {
- try {
- b();
- } catch (MiddleException e) {
- throw new TopException(e);
- }
- }
-
- public void b() throws MiddleException {
- c();
- }
-
- public void c() throws MiddleException {
- try {
- d();
- } catch (BottomException e) {
- throw new MiddleException(e);
- }
- }
-
- public void d() throws BottomException {
- e();
- }
-
- public void e() throws BottomException {
- throw new BottomException();
- }
-}
-
-class TopException extends Exception {
- TopException(Throwable cause) {
- super(cause);
- }
-}
-
-class MiddleException extends Exception {
- MiddleException(Throwable cause) {
- super(cause);
- }
-}
-
-class BottomException extends Exception {
- BottomException() {
- StackTraceElement stack[] = this.getStackTrace();
- for (int i = 0; i < stack.length; i++) {
- String className = stack[i].getClassName();
- String methodName = stack[i].getMethodName();
- System.out.println(className + "." + methodName);
- }
- }
-}