Author: ffang
Date: Thu Aug 6 02:48:52 2009
New Revision: 801501
URL: http://svn.apache.org/viewvc?rev=801501&view=rev
Log:
[SMX4-330]JAXB 2.1 API - TypeConstraintException do not behave as expected by
the spec
Modified:
servicemix/smx4/specs/trunk/jaxb-api-2.1/src/main/java/javax/xml/bind/TypeConstraintException.java
Modified:
servicemix/smx4/specs/trunk/jaxb-api-2.1/src/main/java/javax/xml/bind/TypeConstraintException.java
URL:
http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api-2.1/src/main/java/javax/xml/bind/TypeConstraintException.java?rev=801501&r1=801500&r2=801501&view=diff
==============================================================================
---
servicemix/smx4/specs/trunk/jaxb-api-2.1/src/main/java/javax/xml/bind/TypeConstraintException.java
(original)
+++
servicemix/smx4/specs/trunk/jaxb-api-2.1/src/main/java/javax/xml/bind/TypeConstraintException.java
Thu Aug 6 02:48:52 2009
@@ -50,7 +50,8 @@
}
public Throwable getLinkedException() {
- return getCause();
+ // Do not use getCause() as the cause was never initialized in the
constructor
+ return linkedException;
}
public synchronized void setLinkedException(Throwable linkedException) {
@@ -64,11 +65,15 @@
}
public void printStackTrace() {
- super.printStackTrace();
+ printStackTrace(System.err);
}
public void printStackTrace(PrintStream ps) {
+ if (this.linkedException != null) {
+ this.linkedException.printStackTrace(ps);
+ ps.println("--------------- linked to ------------------");
+ }
super.printStackTrace(ps);
}
-}
\ No newline at end of file
+}