Skip to content

Conversation

@Jarvx
Copy link

@Jarvx Jarvx commented Oct 21, 2025

Issue: #11755

Bug description

TwitterHttpClientConfiguration does not compile because getConnectionPoolConfiguration() must be implemented.

Root cause & Fix

The issue is that HttpClientConfiguration.getConnectionPoolConfiguration() is declared abstract, forcing subclasses (like user examples) to implement it. To fix this without changing the behavior of existing concrete classes, we can provide a sensible default implementation in the base class that returns a new ConnectionPoolConfiguration instance. Subclasses that already override the method (e.g. DefaultHttpClientConfiguration, ServiceHttpClientConfiguration) will continue to work unchanged. This is a minimal, backward-compatible change.

Steps to reproduce

Please use this command to see the test result:

./gradlew :test-suite-kotlin-ksp:test

@Jarvx Jarvx changed the title Fix 11755: Providing a sensible default implementation in the base class that returns a new ConnectionPoolConfiguration instance [GenAI] Fix 11755: Providing a sensible default implementation in the base class that returns a new ConnectionPoolConfiguration instance Oct 24, 2025
* compilation will fail because TwitterHttpClientConfiguration does not
* implement that method (matching the user-guide example).
*/
public class ReproduceIssueTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't make sense to place test code into a kotlin submodule that is Java. All tests should be collocated near the functionality they address, in this case in the http-client-core module

*/
@Named("twitter")
@Singleton
public class TwitterHttpClientConfiguration extends HttpClientConfiguration {
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this even do? It isn't referenced anywhere

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