-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change parent type of JsonProcessingException
to be RuntimeException
#2177
Comments
Note: actual change is being done via and I have a branch with mostly complete changes. However, coordination with all modules is required so while this effort is finally active again, it may take a week or two. |
A lot of work done, on
and just sent an email to Next steps:
and planning on merging the changes tomorrow, January 19th 2021, if all goes well. |
The core change has been completed; continuing with related clean up. Noteworthy related changes:
In all of above cases the new exception type -- planned to replace original one in 3.0 -- will be new super-class so that:
To prevent (2), new types are added as |
Completed; may work on demoting some aspects of |
(NOTE: part of bigger set of changes, see https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-4)
Although choice of
JsonProcessingException
to extendIOException
made sense originally (I think), later developments -- in particular, Java 8 Streams and functional approach in general -- have made use of checked exceptions cumbersome for many use cases.But due to backwards compatibility concerns, change of base exception type has not been possible within 2.x releases.
Now that we are working on 3.0, however, we can make this change. Compared to alternative of providing alternate subtypes of
ObjectMapper
,ObjectReader
and/orObjectWriter
(ones that do not declare checked exceptions for methods), this leads to simpler API.For 2.x we may still consider simpler work-arounds (maybe convenience wrappers), but with 3.0 let's rebase.
Note, too, that this will help use of Jackson for some specific cases like serialization of
this
fromtoString()
(and with #2176).The text was updated successfully, but these errors were encountered: