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 2025/10/21 10:59:45 UTC
(httpcomponents-core) 02/03: Formatting
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 983e48c8fd04b134c8f2589449d933aa84e5d144
Author: Alexis Le Dantec <al...@palantir.com>
AuthorDate: Tue Oct 21 11:23:35 2025 +0200
Formatting
---
.../testing/classic/ClassicIntegrationTest.java | 26 ++++++++++++----------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/classic/ClassicIntegrationTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/classic/ClassicIntegrationTest.java
index ab6aa4f56..73ff66f55 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/classic/ClassicIntegrationTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/classic/ClassicIntegrationTest.java
@@ -40,7 +40,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
-import java.util.concurrent.*;
+import java.util.concurrent.CountDownLatch;
import java.util.function.Consumer;
import org.apache.hc.core5.http.ClassicHttpRequest;
@@ -56,16 +56,12 @@
import org.apache.hc.core5.http.Method;
import org.apache.hc.core5.http.ProtocolException;
import org.apache.hc.core5.http.URIScheme;
-import org.apache.hc.core5.http.config.CharCodingConfig;
import org.apache.hc.core5.http.config.Http1Config;
-import org.apache.hc.core5.http.impl.DefaultAddressResolver;
-import org.apache.hc.core5.http.impl.DefaultConnectionReuseStrategy;
import org.apache.hc.core5.http.impl.HttpProcessors;
import org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionFactory;
import org.apache.hc.core5.http.impl.io.HttpRequestExecutor;
import org.apache.hc.core5.http.io.HttpClientConnection;
import org.apache.hc.core5.http.io.HttpConnectionFactory;
-import org.apache.hc.core5.http.io.SocketConfig;
import org.apache.hc.core5.http.io.entity.AbstractHttpEntity;
import org.apache.hc.core5.http.io.entity.ByteArrayEntity;
import org.apache.hc.core5.http.io.entity.EntityUtils;
@@ -73,8 +69,16 @@
import org.apache.hc.core5.http.io.support.BasicHttpServerExpectationDecorator;
import org.apache.hc.core5.http.message.BasicClassicHttpRequest;
import org.apache.hc.core5.http.message.BasicClassicHttpResponse;
-import org.apache.hc.core5.http.protocol.*;
-import org.apache.hc.core5.io.CloseMode;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpContext;
+import org.apache.hc.core5.http.protocol.HttpCoreContext;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.protocol.RequestConnControl;
+import org.apache.hc.core5.http.protocol.RequestContent;
+import org.apache.hc.core5.http.protocol.RequestExpectContinue;
+import org.apache.hc.core5.http.protocol.RequestTE;
+import org.apache.hc.core5.http.protocol.RequestTargetHost;
+import org.apache.hc.core5.http.protocol.RequestUserAgent;
import org.apache.hc.core5.net.URIAuthority;
import org.apache.hc.core5.testing.SSLTestContexts;
import org.apache.hc.core5.testing.extension.classic.ClassicTestResources;
@@ -83,10 +87,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
-import javax.net.ssl.SSLSocketFactory;
abstract class ClassicIntegrationTest {
@@ -851,7 +852,8 @@ void testImmediateCloseUponSocketTimeout() throws Exception {
});
}
- private static void runWithSocket(HttpHost host, int socketTimeoutMillis, Consumer<Socket> socketConsumer)
+ private static void runWithSocket(
+ final HttpHost host, final int socketTimeoutMillis, final Consumer<Socket> socketConsumer)
throws IOException {
try (final Socket clientSocket = new Socket()) {
clientSocket.setSoTimeout(socketTimeoutMillis);
@@ -861,7 +863,7 @@ private static void runWithSocket(HttpHost host, int socketTimeoutMillis, Consum
return;
}
- try (SSLSocket sslSocket = (SSLSocket) SSLTestContexts.createClientSSLContext()
+ try (final SSLSocket sslSocket = (SSLSocket) SSLTestContexts.createClientSSLContext()
.getSocketFactory()
.createSocket(clientSocket, host.getHostName(), -1, true)) {
sslSocket.startHandshake();