From a2deba9de58b45d91384e1d49a8b6b0dd3e2364c Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Sat, 25 Sep 2010 06:46:36 +0000 Subject: [PATCH] TABS -> SPACES git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1001145 13f79535-47bb-0310-9956-ffa450edef68 --- .../http/conn/params/ConnManagerParams.java | 4 ++-- .../http/conn/scheme/PlainSocketFactory.java | 2 +- .../http/conn/scheme/SchemeSocketFactory.java | 6 ++--- .../org/apache/http/impl/auth/NTLMScheme.java | 2 +- .../http/impl/auth/NegotiateScheme.java | 8 +++---- .../http/impl/conn/IdleConnectionHandler.java | 2 +- .../impl/conn/tsccm/AbstractConnPool.java | 2 +- .../http/impl/conn/tsccm/BasicPoolEntry.java | 12 +++++----- .../http/impl/conn/tsccm/ConnPoolByRoute.java | 24 +++++++++---------- .../tsccm/ThreadSafeClientConnManager.java | 4 ++-- .../http/impl/conn/TestTSCCMWithServer.java | 4 ++-- .../http/localserver/RequestBasicAuth.java | 4 ++-- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java index 8f88a0604..58eac1940 100644 --- a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java +++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java @@ -54,7 +54,7 @@ public final class ConnManagerParams implements ConnManagerPNames { * {@link org.apache.http.conn.ClientConnectionManager}. * * @return timeout in milliseconds. - * + * * @deprecated use {@link HttpConnectionParams#getConnectionTimeout(HttpParams)} */ @Deprecated @@ -71,7 +71,7 @@ public final class ConnManagerParams implements ConnManagerPNames { * {@link org.apache.http.conn.ClientConnectionManager}. * * @param timeout the timeout in milliseconds - * + * * @deprecated use {@link HttpConnectionParams#setConnectionTimeout(HttpParams, int)} */ @Deprecated diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java index 34230a0ab..ebb5fce49 100644 --- a/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java +++ b/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java @@ -88,7 +88,7 @@ public final class PlainSocketFactory implements SocketFactory, SchemeSocketFact * @param params Optional parameters. Parameters passed to this method will have no effect. * This method will create a unconnected instance of {@link Socket} class * using default constructor. - * + * * @since 4.1 */ public Socket createSocket(final HttpParams params) { diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactory.java index f5b5cf6f4..f45bc09ed 100644 --- a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactory.java +++ b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactory.java @@ -48,13 +48,13 @@ public interface SchemeSocketFactory { * {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)}. * * @param params Optional {@link HttpParams parameters}. In most cases these parameters - * will not be required and will have no effect, as usually socket - * initialization should take place in the + * will not be required and will have no effect, as usually socket + * initialization should take place in the * {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)} * method. However, in rare cases one may want to pass additional parameters * to this method in order to create a customized {@link Socket} instance, * for instance bound to a SOCKS proxy server. - * + * * @return a new socket * * @throws IOException if an I/O error occurs while creating the socket diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java b/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java index 4f616a5c2..5776f5515 100644 --- a/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java +++ b/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java @@ -99,7 +99,7 @@ public class NTLMScheme extends AuthSchemeBase { @Override protected void parseChallenge( - final CharArrayBuffer buffer, + final CharArrayBuffer buffer, int beginIndex, int endIndex) throws MalformedChallengeException { String challenge = buffer.substringTrimmed(beginIndex, endIndex); if (challenge.length() == 0) { diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateScheme.java b/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateScheme.java index df2e9c326..99ebe55d5 100644 --- a/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateScheme.java +++ b/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateScheme.java @@ -61,7 +61,7 @@ public class NegotiateScheme extends AuthSchemeBase { TOKEN_GENERATED, FAILED, } - + private static final String SPNEGO_OID = "1.3.6.1.5.5.2"; private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; @@ -227,7 +227,7 @@ public class NegotiateScheme extends AuthSchemeBase { gssContext.requestCredDeleg(true); } if (token == null) { - token = new byte[0]; + token = new byte[0]; } token = gssContext.initSecContext(token, 0, token.length); if (token == null) { @@ -308,7 +308,7 @@ public class NegotiateScheme extends AuthSchemeBase { @Override protected void parseChallenge( - final CharArrayBuffer buffer, + final CharArrayBuffer buffer, int beginIndex, int endIndex) throws MalformedChallengeException { String challenge = buffer.substringTrimmed(beginIndex, endIndex); if (log.isDebugEnabled()) { @@ -322,5 +322,5 @@ public class NegotiateScheme extends AuthSchemeBase { state = State.FAILED; } } - + } diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java b/httpclient/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java index d68f32fdc..aa5813a18 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java @@ -44,7 +44,7 @@ import org.apache.http.HttpConnection; * @see org.apache.http.conn.ClientConnectionManager#closeIdleConnections * * @since 4.0 - * + * * @deprecated no longer used */ @Deprecated diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java index ca141fdc8..a687bdfc4 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java @@ -81,7 +81,7 @@ public abstract class AbstractConnPool implements RefQueueHandler { protected ReferenceQueue refQueue; protected IdleConnectionHandler idleConnHandler; - + /** * Creates a new connection pool. */ diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java index ecbd1bc76..5aeb539e6 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java @@ -44,11 +44,11 @@ import org.apache.http.impl.conn.AbstractPoolEntry; public class BasicPoolEntry extends AbstractPoolEntry { private final long created; - + private long updated; private long validUntil; private long expiry; - + /** * @deprecated do not use */ @@ -75,7 +75,7 @@ public class BasicPoolEntry extends AbstractPoolEntry { HttpRoute route) { this(op, route, -1, TimeUnit.MILLISECONDS); } - + /** * Creates a new pool entry with a specified maximum lifetime. * @@ -83,7 +83,7 @@ public class BasicPoolEntry extends AbstractPoolEntry { * @param route the planned route for the connection * @param connTTL maximum lifetime of this entry, <=0 implies "infinity" * @param timeunit TimeUnit of connTTL - * + * * @since 4.1 */ public BasicPoolEntry(ClientConnectionOperator op, @@ -139,7 +139,7 @@ public class BasicPoolEntry extends AbstractPoolEntry { public long getExpiry() { return this.expiry; } - + public long getValidUntil() { return this.validUntil; } @@ -164,7 +164,7 @@ public class BasicPoolEntry extends AbstractPoolEntry { public boolean isExpired(long now) { return now >= this.expiry; } - + } diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java index 7d4665f3c..2f21a9374 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java @@ -71,7 +71,7 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc private final Log log = LogFactory.getLog(getClass()); private final Lock poolLock; - + /** Connection operator for this pool */ protected final ClientConnectionOperator operator; @@ -80,7 +80,7 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc /** References to issued connections */ protected final Set leasedConnections; - + /** The list of free connections */ protected final Queue freeConnections; @@ -89,17 +89,17 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc /** Map of route-specific pools */ protected final Map routeToPool; - + private final long connTTL; - + private final TimeUnit connTTLTimeUnit; protected volatile boolean shutdown; - + protected volatile int maxTotalConnections; protected volatile int numConnections; - + /** * Creates a new connection pool, managed by route. * @@ -111,7 +111,7 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc int maxTotalConnections) { this(operator, connPerRoute, maxTotalConnections, -1, TimeUnit.MILLISECONDS); } - + /** * @since 4.1 */ @@ -143,7 +143,7 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc protected Lock getLock() { return this.poolLock; } - + /** * Creates a new connection pool, managed by route. * @@ -274,7 +274,7 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc poolLock.unlock(); } } - + @Override public PoolEntryRequest requestPoolEntry( final HttpRoute route, @@ -705,7 +705,7 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc poolLock.unlock(); } } - + /** * Closes idle connections. * @@ -748,7 +748,7 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc public void closeExpiredConnections() { log.debug("Closing expired connections"); long now = System.currentTimeMillis(); - + poolLock.lock(); try { Iterator iter = freeConnections.iterator(); @@ -766,7 +766,7 @@ public class ConnPoolByRoute extends AbstractConnPool { //TODO: remove dependenc poolLock.unlock(); } } - + @Override public void shutdown() { poolLock.lock(); diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java index fc84bb3d4..d8dba9b39 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java @@ -96,7 +96,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager { * @param schreg the scheme registry. * @param connTTL max connection lifetime, <=0 implies "infinity" * @param connTTLTimeUnit TimeUnit of connTTL - * + * * @since 4.1 */ public ThreadSafeClientConnManager(final SchemeRegistry schreg, @@ -112,7 +112,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager { this.pool = createConnectionPool(connTTL, connTTLTimeUnit) ; this.connectionPool = this.pool; } - + /** * Creates a new thread safe connection manager. * diff --git a/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java b/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java index c3eddb75b..c3dc6efe2 100644 --- a/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java +++ b/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java @@ -83,7 +83,7 @@ public class TestTSCCMWithServer extends ServerTestBase { public ThreadSafeClientConnManager createTSCCM(SchemeRegistry schreg) { return createTSCCM(schreg, -1, TimeUnit.MILLISECONDS); } - + public ThreadSafeClientConnManager createTSCCM(SchemeRegistry schreg, long connTTL, TimeUnit connTTLTimeUnit) { if (schreg == null) @@ -394,7 +394,7 @@ public class TestTSCCMWithServer extends ServerTestBase { mgr.shutdown(); } - + @Test public void testCloseExpiredTTLConnections() throws Exception { diff --git a/httpclient/src/test/java/org/apache/http/localserver/RequestBasicAuth.java b/httpclient/src/test/java/org/apache/http/localserver/RequestBasicAuth.java index 8454f085a..5e5fca8df 100644 --- a/httpclient/src/test/java/org/apache/http/localserver/RequestBasicAuth.java +++ b/httpclient/src/test/java/org/apache/http/localserver/RequestBasicAuth.java @@ -37,12 +37,12 @@ import org.apache.http.protocol.HttpContext; public class RequestBasicAuth implements HttpRequestInterceptor { private final BasicAuthTokenExtractor authTokenExtractor; - + public RequestBasicAuth() { super(); this.authTokenExtractor = new BasicAuthTokenExtractor(); } - + public void process( final HttpRequest request, final HttpContext context) throws HttpException, IOException {