-
Notifications
You must be signed in to change notification settings - Fork 972
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
HTTPCLIENT-2321 Clarify default implementation of HttpClientConnectio… #553
HTTPCLIENT-2321 Clarify default implementation of HttpClientConnectio… #553
Conversation
…nManager Add table with default implementations for all relevant component.
fdd9adc
to
6f3e27b
Compare
@@ -134,7 +135,27 @@ | |||
* exclusive and may not apply when building {@link CloseableHttpClient} | |||
* instances. | |||
* </p> | |||
* | |||
* The following are the default implementations per component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kwin In all honesty next time I am going to touch HttpClientBuilder
I am not sure I will get around to updating this table. It will ultimately rot and will cause more harm than good.
In any case If you want this change-set committed, please at the very least update HttpAsyncClientBuilder
, CachingHttpClientBuilder
and CachingHttpAsyncClientBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is a lot of effort. The other alternative would be to establish a common naming (e.g. always use Default
prefix, but this won't be backwards compatible) or at least clarify in the javadoc of the implementation whether it is the default one or not. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kwin As I mentioned in the JIRA I am not in favor of documenting the defaults in javadocs because some people might see them as a part of public contract but you do it consistently across the code base I will review and commit the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You already have that all over the place:
Line 49 in f2b9a37
* Default implementation of {@link AuthCache}. This implements Line 45 in f2b9a37
* Default implementation of {@link CookieStore} Line 40 in f2b9a37
* Default implementation of {@link CredentialsStore}. Line 50 in f2b9a37
* Default implementation of {@link RedirectStrategy}. Line 45 in f2b9a37
* Default implementation of a strategy deciding duration
....
And yes, you are right, I consider this default part of the contract (i.e. changing it is possible but only in a minor version explicitly stating the change somewhere)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kwin Those are the default impl of an interface. They have nothing to do with the behavior of client builders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the last they are all implementations of an interface which can be set on the HttpClientBuilder
. Therefore I assume that the default applies here also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kwin I will have to close this PR unless the proposed changes can be made consistently across the entire code base.
…nManager
Add table with default implementations for all relevant component.