jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMException.java
changeset 31497 4a6b2e733c0d
parent 25868 686eef1e7a79
child 44797 8b3b3b911b8a
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMException.java	Wed Jul 05 20:39:43 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMException.java	Tue Jun 30 12:04:27 2015 +0200
@@ -323,63 +323,5 @@
             super.printStackTrace(s);
         } catch (Throwable e) {}
 
-        boolean isJdk14OrHigher = false;
-        try {
-            Throwable.class.getMethod("getCause", (Class[]) null);
-            isJdk14OrHigher = true;
-        } catch (NoSuchMethodException nsme) {
-            // do nothing
-        }
-
-        // The printStackTrace method of the Throwable class in jdk 1.4
-        // and higher will include the cause when printing the backtrace.
-        // The following code is only required when using jdk 1.3 or lower
-        if (!isJdk14OrHigher) {
-            Throwable exception = getException();
-
-            for (int i = 0; (i < 10) && (null != exception); i++) {
-                s.println("---------");
-
-                try {
-                    if (exception instanceof DTMException) {
-                        String locInfo =
-                            ((DTMException) exception)
-                                .getLocationAsString();
-
-                        if (null != locInfo) {
-                            s.println(locInfo);
-                        }
-                    }
-
-                    exception.printStackTrace(s);
-                } catch (Throwable e) {
-                    s.println("Could not print stack trace...");
-                }
-
-                try {
-                    Method meth =
-                        ((Object) exception).getClass().getMethod("getException",
-                            (Class[]) null);
-
-                    if (null != meth) {
-                        Throwable prev = exception;
-
-                        exception = (Throwable) meth.invoke(exception, (Object[]) null);
-
-                        if (prev == exception) {
-                            break;
-                        }
-                    } else {
-                        exception = null;
-                    }
-                } catch (InvocationTargetException ite) {
-                    exception = null;
-                } catch (IllegalAccessException iae) {
-                    exception = null;
-                } catch (NoSuchMethodException nsme) {
-                    exception = null;
-                }
-            }
-        }
     }
 }