hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1573718 [2/2] - in /httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http: client/protocol/ conn/ssl/ impl/auth/ impl/client/ impl/conn/ impl/execchain/ impl/io/
Date Mon, 03 Mar 2014 20:02:32 GMT
Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RedirectExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RedirectExec.java?rev=1573718&r1=1573717&r2=1573718&view=diff
==============================================================================
--- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RedirectExec.java
(original)
+++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RedirectExec.java
Mon Mar  3 20:02:31 2014
@@ -31,8 +31,8 @@ import java.io.IOException;
 import java.net.URI;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import android.util.Log;
+
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
@@ -67,7 +67,7 @@ import org.apache.http.util.EntityUtilsH
 @ThreadSafe
 public class RedirectExec implements ClientExecChain {
 
-    private final Log log = LogFactory.getLog(getClass());
+    private final static String TAG = "HttpClient";
 
     private final ClientExecChain requestExecutor;
     private final RedirectStrategy redirectStrategy;
@@ -139,22 +139,22 @@ public class RedirectExec implements Cli
                     if (!currentRoute.getTargetHost().equals(newTarget)) {
                         final AuthStateHC4 targetAuthState = context.getTargetAuthState();
                         if (targetAuthState != null) {
-                            this.log.debug("Resetting target auth state");
+                            Log.d(TAG, "Resetting target auth state");
                             targetAuthState.reset();
                         }
                         final AuthStateHC4 proxyAuthState = context.getProxyAuthState();
                         if (proxyAuthState != null) {
                             final AuthScheme authScheme = proxyAuthState.getAuthScheme();
                             if (authScheme != null && authScheme.isConnectionBased())
{
-                                this.log.debug("Resetting proxy auth state");
+                                Log.d(TAG, "Resetting proxy auth state");
                                 proxyAuthState.reset();
                             }
                         }
                     }
 
                     currentRoute = this.routePlanner.determineRoute(newTarget, currentRequest,
context);
-                    if (this.log.isDebugEnabled()) {
-                        this.log.debug("Redirecting to '" + uri + "' via " + currentRoute);
+                    if (Log.isLoggable(TAG, Log.DEBUG)) {
+                        Log.d(TAG, "Redirecting to '" + uri + "' via " + currentRoute);
                     }
                     EntityUtilsHC4.consume(response.getEntity());
                     response.close();
@@ -173,7 +173,7 @@ public class RedirectExec implements Cli
                 try {
                     EntityUtilsHC4.consume(response.getEntity());
                 } catch (final IOException ioex) {
-                    this.log.debug("I/O error while releasing connection", ioex);
+                    Log.d(TAG, "I/O error while releasing connection", ioex);
                 } finally {
                     response.close();
                 }

Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RetryExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RetryExec.java?rev=1573718&r1=1573717&r2=1573718&view=diff
==============================================================================
--- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RetryExec.java
(original)
+++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RetryExec.java
Mon Mar  3 20:02:31 2014
@@ -29,8 +29,8 @@ package org.apache.http.impl.execchain;
 
 import java.io.IOException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import android.util.Log;
+
 import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.NoHttpResponseException;
@@ -58,7 +58,7 @@ import org.apache.http.util.Args;
 @Immutable
 public class RetryExec implements ClientExecChain {
 
-    private final Log log = LogFactory.getLog(getClass());
+    private final static String TAG = "HttpClient";
 
     private final ClientExecChain requestExecutor;
     private final HttpRequestRetryHandler retryHandler;
@@ -86,29 +86,29 @@ public class RetryExec implements Client
                 return this.requestExecutor.execute(route, request, context, execAware);
             } catch (final IOException ex) {
                 if (execAware != null && execAware.isAborted()) {
-                    this.log.debug("Request has been aborted");
+                    Log.d(TAG, "Request has been aborted");
                     throw ex;
                 }
                 if (retryHandler.retryRequest(ex, execCount, context)) {
-                    if (this.log.isInfoEnabled()) {
-                        this.log.info("I/O exception ("+ ex.getClass().getName() +
+                    if (Log.isLoggable(TAG, Log.INFO)) {
+                        Log.i(TAG, "I/O exception ("+ ex.getClass().getName() +
                                 ") caught when processing request to "
                                 + route +
                                 ": "
                                 + ex.getMessage());
                     }
-                    if (this.log.isDebugEnabled()) {
-                        this.log.debug(ex.getMessage(), ex);
+                    if (Log.isLoggable(TAG, Log.DEBUG)) {
+                        Log.d(TAG, ex.getMessage(), ex);
                     }
                     if (!Proxies.isRepeatable(request)) {
-                        this.log.debug("Cannot retry non-repeatable request");
+                        Log.d(TAG, "Cannot retry non-repeatable request");
                         final NonRepeatableRequestException nreex = new NonRepeatableRequestException(
                                 "Cannot retry request with a non-repeatable request entity");
                         nreex.initCause(ex);
                     }
                     request.setHeaders(origheaders);
-                    if (this.log.isInfoEnabled()) {
-                        this.log.info("Retrying request to " + route);
+                    if (Log.isLoggable(TAG, Log.INFO)) {
+                        Log.i(TAG, "Retrying request to " + route);
                     }
                 } else {
                     if (ex instanceof NoHttpResponseException) {

Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java?rev=1573718&r1=1573717&r2=1573718&view=diff
==============================================================================
--- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
(original)
+++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
Mon Mar  3 20:02:31 2014
@@ -30,8 +30,8 @@ package org.apache.http.impl.execchain;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import android.util.Log;
+
 import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.annotation.Immutable;
@@ -57,7 +57,7 @@ import org.apache.http.util.Args;
 @Immutable
 public class ServiceUnavailableRetryExec implements ClientExecChain {
 
-    private final Log log = LogFactory.getLog(getClass());
+    private final static String TAG = "HttpClient";
 
     private final ClientExecChain requestExecutor;
     private final ServiceUnavailableRetryStrategy retryStrategy;
@@ -87,7 +87,7 @@ public class ServiceUnavailableRetryExec
                     final long nextInterval = this.retryStrategy.getRetryInterval();
                     if (nextInterval > 0) {
                         try {
-                            this.log.trace("Wait for " + nextInterval);
+                            Log.d(TAG, "Wait for " + nextInterval);
                             Thread.sleep(nextInterval);
                         } catch (final InterruptedException e) {
                             Thread.currentThread().interrupt();

Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/AbstractMessageParserHC4.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/AbstractMessageParserHC4.java?rev=1573718&r1=1573717&r2=1573718&view=diff
==============================================================================
--- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/AbstractMessageParserHC4.java
(original)
+++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/AbstractMessageParserHC4.java
Mon Mar  3 20:02:31 2014
@@ -76,7 +76,7 @@ public abstract class AbstractMessagePar
      * @param parser the line parser.
      * @param params HTTP parameters.
      *
-     * @deprecated (4.3) use {@link AbstractMessageParserHC4#AbstractMessageParser(SessionInputBuffer,
+     * @deprecated (4.3) use {@link AbstractMessageParserHC4#AbstractMessageParserHC4(SessionInputBuffer,
      *   LineParser, MessageConstraints)}
      */
     @Deprecated

Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/ChunkedOutputStreamHC4.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/ChunkedOutputStreamHC4.java?rev=1573718&r1=1573717&r2=1573718&view=diff
==============================================================================
--- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/ChunkedOutputStreamHC4.java
(original)
+++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/ChunkedOutputStreamHC4.java
Mon Mar  3 20:02:31 2014
@@ -67,7 +67,7 @@ public class ChunkedOutputStreamHC4 exte
      * @param bufferSize The minimum chunk size (excluding last chunk)
      * @throws IOException not thrown
      *
-     * @deprecated (4.3) use {@link ChunkedOutputStreamHC4#ChunkedOutputStream(int, SessionOutputBuffer)}
+     * @deprecated (4.3) use {@link ChunkedOutputStreamHC4#ChunkedOutputStreamHC4(int, SessionOutputBuffer)}
      */
     @Deprecated
     public ChunkedOutputStreamHC4(final SessionOutputBuffer out, final int bufferSize)
@@ -82,7 +82,7 @@ public class ChunkedOutputStreamHC4 exte
      * @param out       the output buffer to wrap
      * @throws IOException not thrown
      *
-     * @deprecated (4.3) use {@link ChunkedOutputStreamHC4#ChunkedOutputStream(int, SessionOutputBuffer)}
+     * @deprecated (4.3) use {@link ChunkedOutputStreamHC4#ChunkedOutputStreamHC4(int, SessionOutputBuffer)}
      */
     @Deprecated
     public ChunkedOutputStreamHC4(final SessionOutputBuffer out)



Mime
View raw message