geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r712260 - /geronimo/specs/trunk/geronimo-jaxb_2.0_spec/src/main/java/javax/xml/bind/TypeConstraintException.java
Date Fri, 07 Nov 2008 20:50:57 GMT
Author: gawor
Date: Fri Nov  7 12:50:57 2008
New Revision: 712260

URL: http://svn.apache.org/viewvc?rev=712260&view=rev
Log:
kinda silly but needed

Modified:
    geronimo/specs/trunk/geronimo-jaxb_2.0_spec/src/main/java/javax/xml/bind/TypeConstraintException.java

Modified: geronimo/specs/trunk/geronimo-jaxb_2.0_spec/src/main/java/javax/xml/bind/TypeConstraintException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxb_2.0_spec/src/main/java/javax/xml/bind/TypeConstraintException.java?rev=712260&r1=712259&r2=712260&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxb_2.0_spec/src/main/java/javax/xml/bind/TypeConstraintException.java
(original)
+++ geronimo/specs/trunk/geronimo-jaxb_2.0_spec/src/main/java/javax/xml/bind/TypeConstraintException.java
Fri Nov  7 12:50:57 2008
@@ -17,6 +17,7 @@
 package javax.xml.bind;
 
 import java.io.PrintStream;
+import java.io.PrintWriter;
 
 public class TypeConstraintException extends RuntimeException {
 
@@ -68,12 +69,34 @@
         return linkedException;
     }
 
-    public void printStackTrace() {
-        super.printStackTrace();
+    @Override
+    public void printStackTrace(PrintStream s) {
+        synchronized (s) {
+            s.println(this);
+            StackTraceElement[] trace = getStackTrace();
+            for (int i=0; i < trace.length; i++) {
+                s.println("\tat " + trace[i]);
+            }
+            Throwable ourCause = getCause();
+            if (ourCause != null) {
+                ourCause.printStackTrace(s);
+            }
+        }
     }
 
-    public void printStackTrace(PrintStream ps) {
-        super.printStackTrace(ps);
+    @Override
+    public void printStackTrace(PrintWriter s) {
+        synchronized (s) {
+            s.println(this);
+            StackTraceElement[] trace = getStackTrace();
+            for (int i=0; i < trace.length; i++) {
+                s.println("\tat " + trace[i]);
+            }
+            Throwable ourCause = getCause();
+            if (ourCause != null) {
+                ourCause.printStackTrace(s);
+            }
+        }
     }
 
 }



Mime
View raw message