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 HttpConnectionProvider mutate method (#2463) #2463

Conversation

yangbongsoo
Copy link

I made mutate method(overriding) in HttpConnectionProvider.
However I can't access Builder class directly.
So I edit mutate method in ConnectionProvider default method

relates: #2462

@pivotal-cla
Copy link

@yangbongsoo Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@yangbongsoo Thank you for signing the Contributor License Agreement!

return ConnectionProvider.super.mutate();
}

return this.http1ConnectionProvider.mutate();
Copy link
Author

Choose a reason for hiding this comment

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

I know that I haven't considered h2ConnectionProvider yet.
I'd like to hear the opinion of the maintainer.

.build();

assertThat(beforeProvider.maxConnections()).isEqualTo(mergedProvider.maxConnections());
assertThat(beforeProvider.name()).isEqualTo(mergedProvider.name());
Copy link
Author

Choose a reason for hiding this comment

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

I wanted to compare more values, but it was inaccessible.

@violetagg
Copy link
Member

@yangbongsoo My idea was not to implement mutate for HttpConnectionProvider, but the configuration to return the original ConnectionProvider. This means if we have

ConnectionProvider provider = ...
HttpClient client = HttpClient.create(provider);

Then the code below will return provider and not the wrapper HttpConnectionProvider

client.configuration().connectionProvider()

Wdyt?

@violetagg violetagg added the type/bug A general bug label Sep 7, 2022
@violetagg violetagg linked an issue Sep 7, 2022 that may be closed by this pull request
@yangbongsoo
Copy link
Author

I made new PR as you recommand. #2468
I hope we can make a better decision by looking at the code.

@violetagg
Copy link
Member

This is superseded by #2483

@violetagg violetagg added status/superseded An issue that has been superseded by another and removed type/bug A general bug labels Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use HttpConnectionProvider mutate method
3 participants