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

HTTPCLIENT-2321 Clarify default implementation of HttpClientConnectio… #553

Closed

Conversation

kwin
Copy link
Member

@kwin kwin commented Feb 28, 2024

…nManager

Add table with default implementations for all relevant component.

…nManager

Add table with default implementations for all relevant component.
@kwin kwin force-pushed the feature/clarify-default-connection-manager branch from fdd9adc to 6f3e27b Compare February 28, 2024 18:02
@@ -134,7 +135,27 @@
* exclusive and may not apply when building {@link CloseableHttpClient}
* instances.
* </p>
*
* The following are the default implementations per component
Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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:

  1. * Default implementation of {@link AuthCache}. This implements

  2. ....

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)

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

@ok2c ok2c closed this Mar 14, 2024
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.

2 participants