Skip to content
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

Refactor : remove superfluous exceptions in throws declaration #3763

Closed

Conversation

JooHyukKim
Copy link
Member

Summary

  • Both StreamReadException and DatabindException are subclass of IOException so the former two are not required
  • Plus From what I understood in issue #1675, we are moving away from checked exceptions by wrapping IOException with JsonProcessingException. So this might prevent confusion in the future??

Copy link
Member

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 from me - still an API change under any definition of an API change - there is absolutely no harm in having the 3 classes declared

The master branch is for the future v3 release and the exceptions are being refactored there. No point in changing anything on v2 branches.

@JooHyukKim
Copy link
Member Author

JooHyukKim commented Jan 29, 2023

The master branch is for the future v3 release and the exceptions are being refactored there. No point in changing anything on v2 branches.

Ah, I see. Then it makes even less sense for this PR to be commited.

@JooHyukKim
Copy link
Member Author

CLOSED

Will close this Issue quoting from @pjfanning that

The master branch is for the future v3 release and the exceptions are being refactored there. No point in changing anything on v2 branches.

@JooHyukKim JooHyukKim closed this Jan 29, 2023
@cowtowncoder
Copy link
Member

You are of course right @JooHyukKim that it is redundant, non-minimal.

But to me this is one of those cases where I think more verbose method declarations are good for documentation purposes; javadocs referencing separate subtypes.

But as @pjfanning pointed out, yes, we are moving to unchecked exceptions in 3.0 (master), and will only declare base JacksonException (or, in some cases, nothing, it being optional as well).

@JooHyukKim JooHyukKim deleted the remove-impossilbe-IOException branch May 22, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants