From 9be91137d58ae0fe5fbbbb42574c71a01f9b8bcf Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Sat, 17 Mar 2007 11:43:29 +0000 Subject: [PATCH] Removed unused imports git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@519292 13f79535-47bb-0310-9956-ffa450edef68 --- .../client/DefaultClientRequestDirector.java | 25 +++++++++---------- .../http/impl/client/DefaultHttpClient.java | 22 ++++++++-------- .../impl/conn/SingleClientConnManager.java | 16 +----------- .../conn/ThreadSafeClientConnManager.java | 7 ++---- src/test/org/apache/http/client/TestAll.java | 10 +++++--- src/test/org/apache/http/conn/TestScheme.java | 6 ++--- .../org/apache/http/conn/ssl/TestAllSSL.java | 4 ++- .../http/conn/ssl/TestHostnameVerifier.java | 11 ++++---- .../http/conn/ssl/TestSSLSocketFactory.java | 18 +++++++------ .../org/apache/http/cookie/TestAllCookie.java | 4 ++- .../apache/http/cookie/TestCookiePolicy.java | 10 ++++---- .../impl/client/TestAllHttpClientImpl.java | 4 ++- .../http/impl/conn/TestAllConnImpl.java | 4 ++- .../http/impl/conn/TestLocalServer.java | 19 ++++++-------- .../impl/cookie/TestAbstractCookieSpec.java | 8 +++--- .../http/impl/cookie/TestAllCookieImpl.java | 4 ++- .../cookie/TestBasicCookieAttribHandlers.java | 8 +++--- .../impl/cookie/TestBrowserCompatSpec.java | 8 +++--- .../impl/cookie/TestCookieNetscapeDraft.java | 8 +++--- .../impl/cookie/TestCookieRFC2109Spec.java | 8 +++--- .../apache/http/localserver/EchoHandler.java | 1 - .../http/localserver/LocalTestServer.java | 23 +++-------------- .../http/localserver/RandomHandler.java | 5 +--- .../http/localserver/ServerTestBase.java | 24 ++++++++---------- 24 files changed, 114 insertions(+), 143 deletions(-) diff --git a/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java b/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java index 45b6cbc03..9542b5e81 100644 --- a/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java +++ b/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java @@ -33,25 +33,24 @@ package org.apache.http.impl.client; import java.io.IOException; -import org.apache.http.HttpVersion; -import org.apache.http.HttpRequest; -import org.apache.http.HttpResponse; -import org.apache.http.HttpException; import org.apache.http.ConnectionReuseStrategy; import org.apache.http.HttpEntity; -import org.apache.http.entity.BasicHttpEntity; +import org.apache.http.HttpException; +import org.apache.http.HttpRequest; +import org.apache.http.HttpResponse; +import org.apache.http.HttpVersion; +import org.apache.http.client.ClientRequestDirector; +import org.apache.http.client.RoutedRequest; +import org.apache.http.conn.BasicManagedEntity; +import org.apache.http.conn.ClientConnectionManager; +import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.ManagedClientConnection; +import org.apache.http.conn.RouteDirector; import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; -import org.apache.http.protocol.HttpRequestExecutor; import org.apache.http.protocol.HttpExecutionContext; -import org.apache.http.conn.HttpRoute; -import org.apache.http.conn.RouteDirector; -import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.ManagedClientConnection; -import org.apache.http.conn.BasicManagedEntity; -import org.apache.http.client.RoutedRequest; -import org.apache.http.client.ClientRequestDirector; +import org.apache.http.protocol.HttpRequestExecutor; diff --git a/src/java/org/apache/http/impl/client/DefaultHttpClient.java b/src/java/org/apache/http/impl/client/DefaultHttpClient.java index 1b014d8a6..0a72b5a27 100644 --- a/src/java/org/apache/http/impl/client/DefaultHttpClient.java +++ b/src/java/org/apache/http/impl/client/DefaultHttpClient.java @@ -33,24 +33,22 @@ package org.apache.http.impl.client; import java.io.IOException; +import org.apache.http.ConnectionReuseStrategy; +import org.apache.http.HttpException; import org.apache.http.HttpHost; import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; -import org.apache.http.HttpException; -import org.apache.http.ConnectionReuseStrategy; -import org.apache.http.impl.DefaultConnectionReuseStrategy; -import org.apache.http.params.HttpParams; -import org.apache.http.protocol.HttpContext; -import org.apache.http.protocol.BasicHttpProcessor; -import org.apache.http.protocol.HttpRequestExecutor; +import org.apache.http.client.ClientRequestDirector; +import org.apache.http.client.RoutedRequest; +import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.HttpRoute; import org.apache.http.conn.Scheme; import org.apache.http.conn.SchemeRegistry; -import org.apache.http.conn.ClientConnectionManager; - -import org.apache.http.client.HttpClient; -import org.apache.http.client.RoutedRequest; -import org.apache.http.client.ClientRequestDirector; +import org.apache.http.impl.DefaultConnectionReuseStrategy; +import org.apache.http.params.HttpParams; +import org.apache.http.protocol.BasicHttpProcessor; +import org.apache.http.protocol.HttpContext; +import org.apache.http.protocol.HttpRequestExecutor; diff --git a/src/java/org/apache/http/impl/conn/SingleClientConnManager.java b/src/java/org/apache/http/impl/conn/SingleClientConnManager.java index 9e2c7ca63..f3639b525 100644 --- a/src/java/org/apache/http/impl/conn/SingleClientConnManager.java +++ b/src/java/org/apache/http/impl/conn/SingleClientConnManager.java @@ -32,31 +32,17 @@ package org.apache.http.impl.conn; import java.io.IOException; -import java.lang.ref.Reference; -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.Map; -import java.util.WeakHashMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.http.HttpHost; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ClientConnectionOperator; -import org.apache.http.conn.ConnectionPoolTimeoutException; -import org.apache.http.conn.SchemeRegistry; import org.apache.http.conn.HttpRoute; -import org.apache.http.conn.RouteTracker; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.OperatedClientConnection; -import org.apache.http.conn.params.HttpConnectionManagerParams; +import org.apache.http.conn.SchemeRegistry; import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; -import org.apache.http.protocol.HttpContext; diff --git a/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java b/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java index f7c0909e8..b7d6a525c 100644 --- a/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java +++ b/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java @@ -43,20 +43,17 @@ import java.util.WeakHashMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.http.HttpHost; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ClientConnectionOperator; import org.apache.http.conn.ConnectionPoolTimeoutException; -import org.apache.http.conn.SchemeRegistry; -import org.apache.http.conn.HttpRoute; -import org.apache.http.conn.RouteTracker; import org.apache.http.conn.HostConfiguration; +import org.apache.http.conn.HttpRoute; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.OperatedClientConnection; +import org.apache.http.conn.SchemeRegistry; import org.apache.http.conn.params.HttpConnectionManagerParams; import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; -import org.apache.http.protocol.HttpContext; /** diff --git a/src/test/org/apache/http/client/TestAll.java b/src/test/org/apache/http/client/TestAll.java index 9360717d5..d2402bf73 100644 --- a/src/test/org/apache/http/client/TestAll.java +++ b/src/test/org/apache/http/client/TestAll.java @@ -30,13 +30,15 @@ package org.apache.http.client; -import org.apache.http.cookie.TestAllCookie; -import org.apache.http.impl.cookie.TestAllCookieImpl; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + import org.apache.http.conn.ssl.TestAllSSL; +import org.apache.http.cookie.TestAllCookie; import org.apache.http.impl.client.TestAllHttpClientImpl; import org.apache.http.impl.conn.TestAllConnImpl; - -import junit.framework.*; +import org.apache.http.impl.cookie.TestAllCookieImpl; public class TestAll extends TestCase { diff --git a/src/test/org/apache/http/conn/TestScheme.java b/src/test/org/apache/http/conn/TestScheme.java index 4429677e4..84f0741a9 100644 --- a/src/test/org/apache/http/conn/TestScheme.java +++ b/src/test/org/apache/http/conn/TestScheme.java @@ -33,13 +33,13 @@ package org.apache.http.conn; import java.util.Iterator; -import org.apache.http.HttpHost; -import org.apache.http.conn.ssl.SSLSocketFactory; - import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.apache.http.HttpHost; +import org.apache.http.conn.ssl.SSLSocketFactory; + /** * Unit tests for {@link Scheme} and {@link SchemeRegistry}. * diff --git a/src/test/org/apache/http/conn/ssl/TestAllSSL.java b/src/test/org/apache/http/conn/ssl/TestAllSSL.java index a32c95b38..141db22fd 100644 --- a/src/test/org/apache/http/conn/ssl/TestAllSSL.java +++ b/src/test/org/apache/http/conn/ssl/TestAllSSL.java @@ -30,7 +30,9 @@ package org.apache.http.conn.ssl; -import junit.framework.*; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; public class TestAllSSL extends TestCase { diff --git a/src/test/org/apache/http/conn/ssl/TestHostnameVerifier.java b/src/test/org/apache/http/conn/ssl/TestHostnameVerifier.java index 85156866d..984017599 100644 --- a/src/test/org/apache/http/conn/ssl/TestHostnameVerifier.java +++ b/src/test/org/apache/http/conn/ssl/TestHostnameVerifier.java @@ -31,16 +31,17 @@ package org.apache.http.conn.ssl; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -import javax.net.ssl.SSLException; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; +import javax.net.ssl.SSLException; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + /** * Unit tests for {@link HostnameVerifier}. * diff --git a/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java b/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java index 8c6c0c4e2..2398f54ee 100644 --- a/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java +++ b/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java @@ -31,14 +31,6 @@ package org.apache.http.conn.ssl; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; -import org.apache.http.params.BasicHttpParams; -import org.apache.http.params.HttpParams; - -import javax.net.ServerSocketFactory; -import javax.net.ssl.SSLServerSocketFactory; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileOutputStream; @@ -55,6 +47,16 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.security.spec.RSAPrivateCrtKeySpec; +import javax.net.ServerSocketFactory; +import javax.net.ssl.SSLServerSocketFactory; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +import org.apache.http.params.BasicHttpParams; +import org.apache.http.params.HttpParams; + /** * Unit tests for {@link SSLSocketFactory}. diff --git a/src/test/org/apache/http/cookie/TestAllCookie.java b/src/test/org/apache/http/cookie/TestAllCookie.java index 0ecbb1db5..1e7fc7907 100644 --- a/src/test/org/apache/http/cookie/TestAllCookie.java +++ b/src/test/org/apache/http/cookie/TestAllCookie.java @@ -30,7 +30,9 @@ package org.apache.http.cookie; -import junit.framework.*; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; public class TestAllCookie extends TestCase { diff --git a/src/test/org/apache/http/cookie/TestCookiePolicy.java b/src/test/org/apache/http/cookie/TestCookiePolicy.java index a4d3c4e66..d775a8cab 100644 --- a/src/test/org/apache/http/cookie/TestCookiePolicy.java +++ b/src/test/org/apache/http/cookie/TestCookiePolicy.java @@ -30,18 +30,18 @@ package org.apache.http.cookie; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +import org.apache.http.cookie.params.CookieSpecParams; import org.apache.http.impl.cookie.BrowserCompatSpec; import org.apache.http.impl.cookie.BrowserCompatSpecFactory; import org.apache.http.impl.cookie.NetscapeDraftSpecFactory; import org.apache.http.impl.cookie.RFC2109SpecFactory; -import org.apache.http.cookie.params.CookieSpecParams; import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - /** * Test cases for {@link CookiePolicy}. */ diff --git a/src/test/org/apache/http/impl/client/TestAllHttpClientImpl.java b/src/test/org/apache/http/impl/client/TestAllHttpClientImpl.java index 2e269e5bd..ed8614bcd 100644 --- a/src/test/org/apache/http/impl/client/TestAllHttpClientImpl.java +++ b/src/test/org/apache/http/impl/client/TestAllHttpClientImpl.java @@ -30,7 +30,9 @@ package org.apache.http.impl.client; -import junit.framework.*; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; public class TestAllHttpClientImpl extends TestCase { diff --git a/src/test/org/apache/http/impl/conn/TestAllConnImpl.java b/src/test/org/apache/http/impl/conn/TestAllConnImpl.java index 6eb0305f8..2df3e5e69 100644 --- a/src/test/org/apache/http/impl/conn/TestAllConnImpl.java +++ b/src/test/org/apache/http/impl/conn/TestAllConnImpl.java @@ -30,7 +30,9 @@ package org.apache.http.impl.conn; -import junit.framework.*; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; public class TestAllConnImpl extends TestCase { diff --git a/src/test/org/apache/http/impl/conn/TestLocalServer.java b/src/test/org/apache/http/impl/conn/TestLocalServer.java index 4e5640145..e1407081a 100644 --- a/src/test/org/apache/http/impl/conn/TestLocalServer.java +++ b/src/test/org/apache/http/impl/conn/TestLocalServer.java @@ -30,23 +30,20 @@ package org.apache.http.impl.conn; -import java.net.Socket; +import junit.framework.Test; +import junit.framework.TestSuite; -import junit.framework.*; - -import org.apache.http.HttpHost; -import org.apache.http.HttpStatus; -import org.apache.http.HttpVersion; -import org.apache.http.HttpRequest; -import org.apache.http.HttpResponse; import org.apache.http.HttpClientConnection; +import org.apache.http.HttpHost; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.entity.StringEntity; +import org.apache.http.localserver.LocalTestServer; +import org.apache.http.localserver.ServerTestBase; import org.apache.http.message.HttpGet; import org.apache.http.message.HttpPost; -import org.apache.http.entity.StringEntity; import org.apache.http.util.EntityUtils; -import org.apache.http.localserver.ServerTestBase; - /** * This is more a test for the {@link LocalTestServer LocalTestServer} diff --git a/src/test/org/apache/http/impl/cookie/TestAbstractCookieSpec.java b/src/test/org/apache/http/impl/cookie/TestAbstractCookieSpec.java index 815b6bda9..11cc61fdf 100644 --- a/src/test/org/apache/http/impl/cookie/TestAbstractCookieSpec.java +++ b/src/test/org/apache/http/impl/cookie/TestAbstractCookieSpec.java @@ -33,16 +33,16 @@ package org.apache.http.impl.cookie; import java.io.IOException; import java.util.Iterator; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + import org.apache.http.Header; import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieAttributeHandler; import org.apache.http.cookie.CookieOrigin; import org.apache.http.cookie.MalformedCookieException; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - public class TestAbstractCookieSpec extends TestCase { public TestAbstractCookieSpec(String testName) { diff --git a/src/test/org/apache/http/impl/cookie/TestAllCookieImpl.java b/src/test/org/apache/http/impl/cookie/TestAllCookieImpl.java index c07bba8ff..238d7f597 100644 --- a/src/test/org/apache/http/impl/cookie/TestAllCookieImpl.java +++ b/src/test/org/apache/http/impl/cookie/TestAllCookieImpl.java @@ -30,7 +30,9 @@ package org.apache.http.impl.cookie; -import junit.framework.*; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; public class TestAllCookieImpl extends TestCase { diff --git a/src/test/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java b/src/test/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java index 9e1387cc3..eeffb5ab5 100644 --- a/src/test/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java +++ b/src/test/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java @@ -34,16 +34,16 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieAttributeHandler; import org.apache.http.cookie.CookieOrigin; import org.apache.http.cookie.MalformedCookieException; import org.apache.http.util.DateUtils; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - public class TestBasicCookieAttribHandlers extends TestCase { public TestBasicCookieAttribHandlers(String testName) { diff --git a/src/test/org/apache/http/impl/cookie/TestBrowserCompatSpec.java b/src/test/org/apache/http/impl/cookie/TestBrowserCompatSpec.java index 7b4621857..2bd4bf35c 100644 --- a/src/test/org/apache/http/impl/cookie/TestBrowserCompatSpec.java +++ b/src/test/org/apache/http/impl/cookie/TestBrowserCompatSpec.java @@ -32,6 +32,10 @@ package org.apache.http.impl.cookie; import java.util.Date; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + import org.apache.http.Header; import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieOrigin; @@ -40,10 +44,6 @@ import org.apache.http.cookie.MalformedCookieException; import org.apache.http.message.BasicHeader; import org.apache.http.util.DateUtils; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - /** * Test cases for BrowserCompatSpec * diff --git a/src/test/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java b/src/test/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java index 222a651c1..044ce50a0 100644 --- a/src/test/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java +++ b/src/test/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java @@ -30,6 +30,10 @@ package org.apache.http.impl.cookie; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + import org.apache.http.Header; import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieOrigin; @@ -37,10 +41,6 @@ import org.apache.http.cookie.CookieSpec; import org.apache.http.cookie.MalformedCookieException; import org.apache.http.message.BasicHeader; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - /** * Test cases for Netscape cookie draft * diff --git a/src/test/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java b/src/test/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java index ca1c45b2a..c21360fdf 100644 --- a/src/test/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java +++ b/src/test/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java @@ -30,6 +30,10 @@ package org.apache.http.impl.cookie; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + import org.apache.http.Header; import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieOrigin; @@ -38,10 +42,6 @@ import org.apache.http.cookie.MalformedCookieException; import org.apache.http.message.BasicHeader; import org.apache.http.util.DateUtils; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - /** * Test cases for RFC2109 cookie spec * diff --git a/src/test/org/apache/http/localserver/EchoHandler.java b/src/test/org/apache/http/localserver/EchoHandler.java index 2d4c1e583..a924a42d9 100644 --- a/src/test/org/apache/http/localserver/EchoHandler.java +++ b/src/test/org/apache/http/localserver/EchoHandler.java @@ -41,7 +41,6 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.MethodNotSupportedException; import org.apache.http.entity.ByteArrayEntity; -import org.apache.http.entity.StringEntity; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpRequestHandler; import org.apache.http.util.EntityUtils; diff --git a/src/test/org/apache/http/localserver/LocalTestServer.java b/src/test/org/apache/http/localserver/LocalTestServer.java index dd8c10eca..c8b0c3294 100644 --- a/src/test/org/apache/http/localserver/LocalTestServer.java +++ b/src/test/org/apache/http/localserver/LocalTestServer.java @@ -31,31 +31,17 @@ package org.apache.http.localserver; -import java.io.File; import java.io.IOException; -import java.io.InterruptedIOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.net.Socket; -import java.net.ServerSocket; import java.net.InetSocketAddress; -import java.net.BindException; -import java.util.Set; -import java.util.HashSet; +import java.net.ServerSocket; +import java.net.Socket; import java.util.Collections; +import java.util.HashSet; +import java.util.Set; import org.apache.http.ConnectionReuseStrategy; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpException; -import org.apache.http.HttpRequest; -import org.apache.http.HttpResponse; import org.apache.http.HttpServerConnection; -import org.apache.http.HttpStatus; -import org.apache.http.MethodNotSupportedException; -import org.apache.http.entity.ContentProducer; -import org.apache.http.entity.EntityTemplate; -import org.apache.http.entity.FileEntity; import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.DefaultHttpResponseFactory; import org.apache.http.impl.DefaultHttpServerConnection; @@ -73,7 +59,6 @@ import org.apache.http.protocol.ResponseConnControl; import org.apache.http.protocol.ResponseContent; import org.apache.http.protocol.ResponseDate; import org.apache.http.protocol.ResponseServer; -import org.apache.http.util.EntityUtils; /** * Local HTTP server for tests that require one. diff --git a/src/test/org/apache/http/localserver/RandomHandler.java b/src/test/org/apache/http/localserver/RandomHandler.java index ea2dfb65a..54fbea612 100644 --- a/src/test/org/apache/http/localserver/RandomHandler.java +++ b/src/test/org/apache/http/localserver/RandomHandler.java @@ -31,13 +31,11 @@ package org.apache.http.localserver; +import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.io.IOException; import java.io.UnsupportedEncodingException; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpException; import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; @@ -46,7 +44,6 @@ import org.apache.http.MethodNotSupportedException; import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpRequestHandler; -import org.apache.http.util.EntityUtils; diff --git a/src/test/org/apache/http/localserver/ServerTestBase.java b/src/test/org/apache/http/localserver/ServerTestBase.java index 3e3810b94..0290c4c18 100644 --- a/src/test/org/apache/http/localserver/ServerTestBase.java +++ b/src/test/org/apache/http/localserver/ServerTestBase.java @@ -32,25 +32,23 @@ package org.apache.http.localserver; import java.net.Socket; -import junit.framework.*; +import junit.framework.TestCase; import org.apache.http.HttpHost; import org.apache.http.HttpVersion; -import org.apache.http.HttpRequest; -import org.apache.http.HttpResponse; -import org.apache.http.params.HttpParams; -import org.apache.http.params.HttpProtocolParams; -import org.apache.http.params.BasicHttpParams; -import org.apache.http.protocol.BasicHttpProcessor; -import org.apache.http.protocol.RequestConnControl; -import org.apache.http.protocol.RequestContent; -import org.apache.http.protocol.HttpRequestExecutor; -import org.apache.http.protocol.HttpExecutionContext; -import org.apache.http.impl.DefaultHttpClientConnection; +import org.apache.http.conn.PlainSocketFactory; import org.apache.http.conn.Scheme; import org.apache.http.conn.SchemeRegistry; import org.apache.http.conn.SocketFactory; -import org.apache.http.conn.PlainSocketFactory; +import org.apache.http.impl.DefaultHttpClientConnection; +import org.apache.http.params.BasicHttpParams; +import org.apache.http.params.HttpParams; +import org.apache.http.params.HttpProtocolParams; +import org.apache.http.protocol.BasicHttpProcessor; +import org.apache.http.protocol.HttpExecutionContext; +import org.apache.http.protocol.HttpRequestExecutor; +import org.apache.http.protocol.RequestConnControl; +import org.apache.http.protocol.RequestContent; /**