[jdom-interest] Bug Report: JDOMException.printStackTrace bug revisited

Jan Vanhercke jan.vanhercke at c-cure.be
Sat May 11 13:45:50 PDT 2002


The bugfix in revision 1.16 of JDOMException is only partial, since 
similar code occurs further down in the source.

The patch below fixes the remaining issue:

--- JDOMException.java   Sat May 11 22:04:44 2002
+++ JDOMException.java  Sat May 11 22:04:19 2002
@@ -254,7 +254,7 @@
         // Print the stack trace for each nested exception.
         while((child = getNestedException(parent)) != null) {
             if (child != null) {
-                System.err.print("Caused by: ");
+                w.print("Caused by: ");
                 child.printStackTrace(w);
                 // Any nested JDOMException will print its own children,
                 // so we need to break out of here.





More information about the jdom-interest mailing list