summaryrefslogtreecommitdiffstats
path: root/xml/src/main/java/javax
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2010-01-28 01:47:36 -0800
committerJesse Wilson <jessewilson@google.com>2010-01-28 01:47:36 -0800
commit71c6f9e7ecc49ddee3039b7682d424124c867398 (patch)
tree421c9426d91d547aaffd1604ccc95c153990d0d4 /xml/src/main/java/javax
parentcf952b2e5eae48916607b5807ac8d0f3dda79be2 (diff)
downloadlibcore-71c6f9e7ecc49ddee3039b7682d424124c867398.zip
libcore-71c6f9e7ecc49ddee3039b7682d424124c867398.tar.gz
libcore-71c6f9e7ecc49ddee3039b7682d424124c867398.tar.bz2
Removing dead code from our copy of Xalan.
The trace package isn't accessible via our public API, so I've removed it. Exception localization isn't worthwhile. The Exslt code is a third-party extension that isn't necessary for the spec. Several other classes and methods were unused; I used IntelliJ to find and remove these. There's more that can go, but this is a fine first step.
Diffstat (limited to 'xml/src/main/java/javax')
-rw-r--r--xml/src/main/java/javax/xml/transform/TransformerException.java64
1 files changed, 0 insertions, 64 deletions
diff --git a/xml/src/main/java/javax/xml/transform/TransformerException.java b/xml/src/main/java/javax/xml/transform/TransformerException.java
index 4c9e35d..fbcb1b0 100644
--- a/xml/src/main/java/javax/xml/transform/TransformerException.java
+++ b/xml/src/main/java/javax/xml/transform/TransformerException.java
@@ -19,9 +19,6 @@
package javax.xml.transform;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-
/**
* This class specifies an exceptional condition that occurred
* during the transformation process.
@@ -315,66 +312,5 @@ public class TransformerException extends Exception {
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 TransformerException) {
- String locInfo =
- ((TransformerException) 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;
- }
- }
- }
- // insure output is written
- s.flush();
}
}