Fix the printing of the suppressed exceptions on Java6
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/aaaf1a5d Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/aaaf1a5d Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/aaaf1a5d Branch: refs/heads/2.6.x-fixes Commit: aaaf1a5d7579adec9acf636cf5cb7c935a8d2f64 Parents: fdc0e6e Author: Daniel Kulp <[email protected]> Authored: Thu Mar 20 11:03:56 2014 -0400 Committer: Daniel Kulp <[email protected]> Committed: Thu Mar 20 16:45:21 2014 -0400 ---------------------------------------------------------------------- .../main/java/org/apache/cxf/tools/common/ToolException.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/aaaf1a5d/tools/common/src/main/java/org/apache/cxf/tools/common/ToolException.java ---------------------------------------------------------------------- diff --git a/tools/common/src/main/java/org/apache/cxf/tools/common/ToolException.java b/tools/common/src/main/java/org/apache/cxf/tools/common/ToolException.java index e353b23..5fc2cda 100644 --- a/tools/common/src/main/java/org/apache/cxf/tools/common/ToolException.java +++ b/tools/common/src/main/java/org/apache/cxf/tools/common/ToolException.java @@ -112,13 +112,13 @@ public class ToolException extends RuntimeException { // Print suppressed exceptions, if any for (Throwable se : suppressed) { - printThrowable(se, ps, pfx + "/t", "Suppressed: "); + printThrowable(se, ps, pfx + "\t", "Suppressed: "); } // Print cause, if any Throwable ourCause = getCause(); if (ourCause != null && (!hasSuppressed || ourCause != suppressed.get(0))) { - printThrowable(ourCause, ps, pfx + "/t", "Caused by: "); + printThrowable(ourCause, ps, pfx + "\t", "Caused by: "); } } private void printThrowable(Throwable t, PrintStream ps, String pfx, String cap) { @@ -143,7 +143,7 @@ public class ToolException extends RuntimeException { this.getClass().getMethod("addSuppressed", Throwable.class).invoke(this, t); } catch (Throwable t2) { //java < 1.7 - suppressed.add(t2); + suppressed.add(t); if (getCause() == null) { initCause(t); }
