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

Use Throwable.addSuppressed() directly and/or via try-with-resources #1221

Closed
cowtowncoder opened this issue May 4, 2016 · 1 comment
Closed
Milestone

Comments

@cowtowncoder
Copy link
Member

Looks like JDK 7 can solve a nasty problem with secondary exceptions thrown when flushing/closing encoders (like with Avro), by addSuppressed() method. Since we still try to work with Android, at least for 2.8, let's add method(s) via Java7Support abstraction.

@cowtowncoder
Copy link
Member Author

FWIW, Throwable.addSuppressed() was added in Android 4.4 (API level 19):

http://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)

http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels

So we can probably just call it directly with Jackson 2.9.

cowtowncoder added a commit that referenced this issue May 4, 2016
@cowtowncoder cowtowncoder changed the title (2.8) Use Throwable.addSuppressed(), via compatibility package Use Throwable.addSuppressed() directly and/or via try-with-resources May 4, 2016
@cowtowncoder cowtowncoder added this to the 2.8.0 milestone May 4, 2016
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

No branches or pull requests

1 participant