Pool 269 generic exceptions#143
Merged
garydgregory merged 5 commits intoapache:masterfrom Apr 21, 2022
Merged
Conversation
Generic Exception for ObjectPool.
Generic Exception for KeyedPooledObjectFactory.
Generic Exception for KeyedObjectPool.
Generic Exception for KeyedObjectPool.
Wait a little more.
michael-o
requested changes
Apr 16, 2022
Member
michael-o
left a comment
There was a problem hiding this comment.
Honestly, I see zero benefit since there is no specialized documented exception from Pool, but rather from internal code.
Member
Author
|
The benefit is when you create a factory that throws a checked or unchecked
exception, like JDBCException for example, or FooException, then your
pooling call sites only need to propagate JDBCException, not
java.lang.Exception, which is a horrow show. Furthermore, if your factory
throws only unchecked exceptions, your pooling call sites do not have to
deal with all APIs throwing Exception. A double win IMO.
Gary
…On Sat, Apr 16, 2022, 14:55 Michael Osipov ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Honestly, I see zero benefit since there is no specialized *documented*
exception from Pool, but rather from internal code.
—
Reply to this email directly, view it on GitHub
<#143 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJB6NYQSNZM732V5HFJ5PTVFMELVANCNFSM5TSV7VQA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Member
|
I still don't consider this as a clean solution, but only halfbreed not to wait for next major. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Binary compatible (mvn clean verify japicmp;cmp) use of generics for exceptions.
https://issues.apache.org/jira/browse/POOL-269