Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Retrofitting exception link mechanism of JAXBException #41

Closed
glassfishrobot opened this issue Oct 20, 2004 · 9 comments
Closed

Retrofitting exception link mechanism of JAXBException #41

glassfishrobot opened this issue Oct 20, 2004 · 9 comments

Comments

@glassfishrobot
Copy link

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]

@glassfishrobot
Copy link
Author

Reported by kohsuke

@glassfishrobot
Copy link
Author

Was assigned to kohsuke

@glassfishrobot
Copy link
Author

kohsuke said:
I forgot to mention that JAXBException is missing serialVersionUID, and
we should put that in.

@glassfishrobot
Copy link
Author

kohsuke said:
Committed changes.

@glassfishrobot
Copy link
Author

kohsuke said:
changed to FIXED.

@glassfishrobot
Copy link
Author

kohsuke said:
Created an attachment (id=3)
Proposed diff. I incorrectly attached this to issue #39.

@glassfishrobot
Copy link
Author

File: diff
Attached By: kohsuke

@glassfishrobot
Copy link
Author

Marked as fixed on Monday, July 31st 2006, 10:15:55 am

@glassfishrobot
Copy link
Author

This issue was imported from java.net JIRA JSR222-41

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant