You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2019/06/05 10:20:17 UTC
[httpcomponents-core] 02/03: Fixed generics
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch release-preparation
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 9e13ee292c1c4e495648c42afe4cb12d96ccb314
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Wed Jun 5 12:15:47 2019 +0200
Fixed generics
---
.../org/apache/hc/core5/testing/framework/TestingFramework.java | 3 ++-
.../apache/hc/core5/testing/nio/Http2ServerAndRequesterTest.java | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java
index 7c2f9f8..b9ac33e 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java
@@ -52,6 +52,7 @@ import org.apache.hc.core5.http.HttpVersion;
import org.apache.hc.core5.http.ProtocolVersion;
import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.HttpRequestHandler;
import org.apache.hc.core5.http.io.SocketConfig;
import org.apache.hc.core5.http.protocol.UriPatternMatcher;
import org.apache.hc.core5.io.CloseMode;
@@ -232,7 +233,7 @@ public class TestingFramework {
.build();
final ServerBootstrap serverBootstrap = ServerBootstrap.bootstrap()
- .setLookupRegistry(new UriPatternMatcher())
+ .setLookupRegistry(new UriPatternMatcher<HttpRequestHandler>())
.setSocketConfig(socketConfig)
.register("/*", requestHandler);
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndRequesterTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndRequesterTest.java
index 9bcd1b6..f0f6b0f 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndRequesterTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndRequesterTest.java
@@ -47,10 +47,10 @@ import org.apache.hc.core5.http.impl.bootstrap.HttpAsyncRequester;
import org.apache.hc.core5.http.impl.bootstrap.HttpAsyncServer;
import org.apache.hc.core5.http.nio.AsyncClientEndpoint;
import org.apache.hc.core5.http.nio.AsyncServerExchangeHandler;
-import org.apache.hc.core5.http.nio.support.BasicRequestProducer;
-import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http.nio.entity.StringAsyncEntityConsumer;
import org.apache.hc.core5.http.nio.entity.StringAsyncEntityProducer;
+import org.apache.hc.core5.http.nio.support.BasicRequestProducer;
+import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http.protocol.UriPatternMatcher;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
@@ -107,7 +107,7 @@ public class Http2ServerAndRequesterTest {
protected void before() throws Throwable {
log.debug("Starting up test server");
server = H2ServerBootstrap.bootstrap()
- .setLookupRegistry(new UriPatternMatcher())
+ .setLookupRegistry(new UriPatternMatcher<Supplier<AsyncServerExchangeHandler>>())
.setVersionPolicy(HttpVersionPolicy.NEGOTIATE)
.setIOReactorConfig(
IOReactorConfig.custom()