jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Jackson JSON Processor
  • JACKSON-95

Try to make simple exceptions deserializable

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Although Exceptions (or any Throwables actually) can be serialized acceptably, they can not yet be deserialized (immediate problem is with "cause" propery, there is "getCause" but no "setCause"; that's "initCause").

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Tatu Saloranta added a comment - 04/Apr/09 1:11 AM

Hmmh. Ok, so I got "initCause" added as a setter. But now the problem is "message" – there is no "setMessage" (exceptions are no beans all right). So I will need to find a constructor... tricky.
There is another Jira entry for adding ability to auto-detect constructors, but that wouldn't help here since it'll need annotation support.
But for now a simple heuristic just might work: most exception classes do have single-string-arg constructor for passing in message. So let's assume that for now...

Show
Tatu Saloranta added a comment - 04/Apr/09 1:11 AM Hmmh. Ok, so I got "initCause" added as a setter. But now the problem is "message" – there is no "setMessage" (exceptions are no beans all right). So I will need to find a constructor... tricky. There is another Jira entry for adding ability to auto-detect constructors, but that wouldn't help here since it'll need annotation support. But for now a simple heuristic just might work: most exception classes do have single-string-arg constructor for passing in message. So let's assume that for now...
Hide
Permalink
Tatu Saloranta added a comment - 08/Apr/09 1:04 AM

Added basic support. Works to the degree current deserialization system can, without actual class information (for which another issue was added).

Show
Tatu Saloranta added a comment - 08/Apr/09 1:04 AM Added basic support. Works to the degree current deserialization system can, without actual class information (for which another issue was added).
Hide
Permalink
Tatu Saloranta added a comment - 02/Jun/09 5:26 PM

Included in 0.9.9-4 release.

Show
Tatu Saloranta added a comment - 02/Jun/09 5:26 PM Included in 0.9.9-4 release.

People

  • Assignee:
    Tatu Saloranta
    Reporter:
    Tatu Saloranta
Vote (0)
Watch (0)

Dates

  • Created:
    03/Apr/09 4:14 PM
    Updated:
    02/Jun/09 5:26 PM
    Resolved:
    08/Apr/09 1:04 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.