Closed glassfishrobot closed 18 years ago
Reported by kohsuke
kohsuke said: I forgot to mention that JAXBException is missing serialVersionUID, and we should put that in.
kohsuke said: Committed changes.
kohsuke said: changed to FIXED.
kohsuke said: Created an attachment (id=3) Proposed diff. I incorrectly attached this to issue #39.
File: diff Attached By: kohsuke
Was assigned to kohsuke
This issue was imported from java.net JIRA JSR222-41
Marked as fixed on Monday, July 31st 2006, 10:15:55 am
Since JAXB 2.0 is going to require J2SE 5.0, we should take this opportunity to retrofit JAXBException's exception chaining mechanism into that of JDK 1.4.
Today, JAXBException has its own mechanism to link to another (wrapped) exception, and it has its own code to print the information about this linked exception in its printStackTrace method.
Starting from JDK 1.4, java.lang.Throwable has this exact feature. We can take advantage of this by tweaking JAXBException.
The change would allow the stack trace to be printed in the same way as the rest of exceptions. The printing method in JDK is also smarter than the one in JAXBException.
When making this change, we have to be careful not to break the compatibility. Fortunately, many of the core JDK exceptions (such as java.lang.InvocationTargetException) went through this retrofitting process, so we know how to do it right.
Environment
Operating System: All Platform: All
Affected Versions
[2.0 v0.4]