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

Ensure Serializer runtime exceptions are rethrown as IOException #6969

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jack-berg
Copy link
Member

Resolves #6946, #6916.

@laurit interested in your thoughts on this as well, since its about the stateless marshalers.

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.11%. Comparing base (77b1f64) to head (4960e78).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6969      +/-   ##
============================================
+ Coverage     90.09%   90.11%   +0.02%     
  Complexity     6600     6600              
============================================
  Files           730      730              
  Lines         19843    19852       +9     
  Branches       1955     1955              
============================================
+ Hits          17877    17890      +13     
+ Misses         1371     1367       -4     
  Partials        595      595              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@laurit laurit left a comment

Choose a reason for hiding this comment

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

Looks good to me. I don't see too many alternatives. I guess instead of UncheckedIOException could use a sneaky throw hack and throw the IOException without declaring it, but the current solution is probably easier to understand. Another alternative would be to reimplement the forEach and introduce a ThrowingConsumer, but that isn't desirable because we'd need to use iterator in our forEach variant while IdentityHashMap etc. implement it without extra allocations.

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.

Encapsulated StreamResetException as IllegalStateException unhandled by the SDK
2 participants