hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1493732 - in /httpcomponents/httpcore/trunk: httpcore-nio/src/main/java/org/apache/http/nio/pool/ httpcore-nio/src/main/java/org/apache/http/nio/protocol/ httpcore/src/main/java/org/apache/http/impl/ httpcore/src/main/java/org/apache/http/...
Date Mon, 17 Jun 2013 12:27:52 GMT
Author: sebb
Date: Mon Jun 17 12:27:51 2013
New Revision: 1493732

URL: http://svn.apache.org/r1493732
Log:
Make autoboxing explicit

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/NullRequestConsumer.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpCoreContext.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java?rev=1493732&r1=1493731&r2=1493732&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
Mon Jun 17 12:27:51 2013
@@ -540,7 +540,7 @@ public abstract class AbstractNIOConnPoo
     private int getMax(final T route) {
         final Integer v = this.maxPerRoute.get(route);
         if (v != null) {
-            return v;
+            return v.intValue();
         } else {
             return this.defaultMaxPerRoute;
         }
@@ -589,7 +589,7 @@ public abstract class AbstractNIOConnPoo
         Args.positive(max, "Max value");
         this.lock.lock();
         try {
-            this.maxPerRoute.put(route, max);
+            this.maxPerRoute.put(route, Integer.valueOf(max));
         } finally {
             this.lock.unlock();
         }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/NullRequestConsumer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/NullRequestConsumer.java?rev=1493732&r1=1493731&r2=1493732&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/NullRequestConsumer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/NullRequestConsumer.java
Mon Jun 17 12:27:51 2013
@@ -66,7 +66,7 @@ class NullRequestConsumer implements Htt
     }
 
     public Object getResult() {
-        return this.completed;
+        return Boolean.valueOf(this.completed);
     }
 
     public Exception getException() {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java?rev=1493732&r1=1493731&r2=1493732&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java
Mon Jun 17 12:27:51 2013
@@ -106,18 +106,18 @@ public class HttpConnectionMetricsImpl i
         }
         if (value == null) {
             if (REQUEST_COUNT.equals(metricName)) {
-                value = requestCount;
+                value = Long.valueOf(requestCount);
             } else if (RESPONSE_COUNT.equals(metricName)) {
-                value = responseCount;
+                value = Long.valueOf(responseCount);
             } else if (RECEIVED_BYTES_COUNT.equals(metricName)) {
                 if (this.inTransportMetric != null) {
-                    return this.inTransportMetric.getBytesTransferred();
+                    return Long.valueOf(this.inTransportMetric.getBytesTransferred());
                 } else {
                     return null;
                 }
             } else if (SENT_BYTES_COUNT.equals(metricName)) {
                 if (this.outTransportMetric != null) {
-                    return this.outTransportMetric.getBytesTransferred();
+                    return Long.valueOf(this.outTransportMetric.getBytesTransferred());
                 } else {
                     return null;
                 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java?rev=1493732&r1=1493731&r2=1493732&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
Mon Jun 17 12:27:51 2013
@@ -54,11 +54,11 @@ public abstract class AbstractHttpParams
         if (param == null) {
             return defaultValue;
         }
-        return (Long) param;
+        return ((Long) param).longValue();
     }
 
     public HttpParams setLongParameter(final String name, final long value) {
-        setParameter(name, value);
+        setParameter(name, Long.valueOf(value));
         return this;
     }
 
@@ -67,11 +67,11 @@ public abstract class AbstractHttpParams
         if (param == null) {
             return defaultValue;
         }
-        return (Integer) param;
+        return ((Integer) param).intValue();
     }
 
     public HttpParams setIntParameter(final String name, final int value) {
-        setParameter(name, value);
+        setParameter(name, Integer.valueOf(value));
         return this;
     }
 
@@ -80,11 +80,11 @@ public abstract class AbstractHttpParams
         if (param == null) {
             return defaultValue;
         }
-        return (Double) param;
+        return ((Double) param).doubleValue();
     }
 
     public HttpParams setDoubleParameter(final String name, final double value) {
-        setParameter(name, value);
+        setParameter(name, Double.valueOf(value));
         return this;
     }
 
@@ -93,7 +93,7 @@ public abstract class AbstractHttpParams
         if (param == null) {
             return defaultValue;
         }
-        return (Boolean) param;
+        return ((Boolean) param).booleanValue();
     }
 
     public HttpParams setBooleanParameter(final String name, final boolean value) {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java?rev=1493732&r1=1493731&r2=1493732&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
Mon Jun 17 12:27:51 2013
@@ -319,7 +319,7 @@ public abstract class AbstractConnPool<T
     private int getMax(final T route) {
         final Integer v = this.maxPerRoute.get(route);
         if (v != null) {
-            return v;
+            return v.intValue();
         } else {
             return this.defaultMaxPerRoute;
         }
@@ -368,7 +368,7 @@ public abstract class AbstractConnPool<T
         Args.notNegative(max, "Max per route value");
         this.lock.lock();
         try {
-            this.maxPerRoute.put(route, max);
+            this.maxPerRoute.put(route, Integer.valueOf(max));
         } finally {
             this.lock.unlock();
         }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpCoreContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpCoreContext.java?rev=1493732&r1=1493731&r2=1493732&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpCoreContext.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpCoreContext.java
Mon Jun 17 12:27:51 2013
@@ -134,7 +134,7 @@ public class HttpCoreContext implements 
 
     public boolean isRequestSent() {
         final Boolean b = getAttribute(HTTP_REQ_SENT, Boolean.class);
-        return b != null && b;
+        return b != null && b.booleanValue();
     }
 
     public HttpResponse getResponse() {



Mime
View raw message