Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,13 @@ public void setEventLoopGroup(@NonNull String eventLoopGroup) {
/**
* Obtains the connection pool configuration.
*
* @return The connection pool configuration.
* Subclasses may override to provide a specific ConnectionPoolConfiguration instance.
*
* @return The connection pool configuration. Defaults to a new ConnectionPoolConfiguration instance.
*/
public abstract ConnectionPoolConfiguration getConnectionPoolConfiguration();
public ConnectionPoolConfiguration getConnectionPoolConfiguration() {
return new ConnectionPoolConfiguration();
}

/**
* @return The {@link SslConfiguration} for the client
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.micronaut.reproduce;

import org.junit.jupiter.api.Test;

/**
* Trivial test whose only purpose is to ensure the test sources are compiled.
* If HttpClientConfiguration#getConnectionPoolConfiguration() is abstract,
* 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


@Test
void compileOnlySmoke() {
// Intentionally empty. Successful compilation of the test sources
// (which include TwitterHttpClientConfiguration) indicates the
// framework does not declare getConnectionPoolConfiguration() as abstract.
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.micronaut.reproduce;

import jakarta.inject.Named;
import jakarta.inject.Singleton;

import io.micronaut.http.client.HttpClientConfiguration;
import io.micronaut.runtime.ApplicationConfiguration;

/**
* Mirrors the user-guide example: a concrete subclass of
* io.micronaut.http.client.HttpClientConfiguration that does not
* override getConnectionPoolConfiguration().
*
* If HttpClientConfiguration#getConnectionPoolConfiguration() is declared
* abstract in the framework (as reported in the issue), this class will
* fail to compile because it does not implement that method.
*/
@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


public TwitterHttpClientConfiguration(ApplicationConfiguration configuration) {
super(configuration);
}
}
Loading