hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1571423 - in /httpcomponents/httpclient/trunk: httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ httpclient/src/main/java/org/apache/http/impl/auth/
Date Mon, 24 Feb 2014 20:16:48 GMT
Author: sebb
Date: Mon Feb 24 20:16:48 2014
New Revision: 1571423

URL: http://svn.apache.org/r1571423
Log:
Explicit boxing

Modified:
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java?rev=1571423&r1=1571422&r2=1571423&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java
Mon Feb 24 20:16:48 2014
@@ -219,7 +219,7 @@ class BasicHttpCache implements HttpCach
         error.setHeader("Content-Type","text/plain;charset=UTF-8");
         final String msg = String.format("Received incomplete response " +
                 "with Content-Length %d but actual body length %d",
-                contentLength, resource.length());
+                contentLength, Long.valueOf(resource.length()));
         final byte[] msgBytes = msg.getBytes();
         error.setHeader("Content-Length", Integer.toString(msgBytes.length));
         error.setEntity(new ByteArrayEntity(msgBytes));

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java?rev=1571423&r1=1571422&r2=1571423&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java
Mon Feb 24 20:16:48 2014
@@ -71,7 +71,7 @@ class BasicIdGenerator {
         buffer.append(System.currentTimeMillis());
         buffer.append('.');
         final Formatter formatter = new Formatter(buffer, Locale.US);
-        formatter.format("%1$016x-%2$08x", this.count, rndnum);
+        formatter.format("%1$016x-%2$08x", Long.valueOf(this.count), Integer.valueOf(rndnum));
         formatter.close();
         buffer.append('.');
         buffer.append(this.hostname);

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java?rev=1571423&r1=1571422&r2=1571423&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
Mon Feb 24 20:16:48 2014
@@ -515,12 +515,14 @@ public class CachingExec implements Clie
         final String release = (vi != null) ? vi.getRelease() : VersionInfo.UNAVAILABLE;
 
         String value;
+        final Integer major = Integer.valueOf(pv.getMajor());
+        final Integer minor = Integer.valueOf(pv.getMinor());
         if ("http".equalsIgnoreCase(pv.getProtocol())) {
-            value = String.format("%d.%d localhost (Apache-HttpClient/%s (cache))", pv.getMajor(),
pv.getMinor(),
+            value = String.format("%d.%d localhost (Apache-HttpClient/%s (cache))", major,
minor,
                     release);
         } else {
-            value = String.format("%s/%d.%d localhost (Apache-HttpClient/%s (cache))", pv.getProtocol(),
pv.getMajor(),
-                    pv.getMinor(), release);
+            value = String.format("%s/%d.%d localhost (Apache-HttpClient/%s (cache))", pv.getProtocol(),
major,
+                    minor, release);
         }
         viaHeaders.put(pv, value);
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java?rev=1571423&r1=1571422&r2=1571423&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java
Mon Feb 24 20:16:48 2014
@@ -360,10 +360,10 @@ class WarningValue {
     @Override
     public String toString() {
         if (warnDate != null) {
-            return String.format("%d %s %s \"%s\"", warnCode,
+            return String.format("%d %s %s \"%s\"", Integer.valueOf(warnCode),
                     warnAgent, warnText, DateUtils.formatDate(warnDate));
         } else {
-            return String.format("%d %s %s", warnCode, warnAgent, warnText);
+            return String.format("%d %s %s", Integer.valueOf(warnCode), warnAgent, warnText);
         }
     }
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java?rev=1571423&r1=1571422&r2=1571423&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
Mon Feb 24 20:16:48 2014
@@ -311,7 +311,7 @@ public class DigestScheme extends RFC261
         }
         final StringBuilder sb = new StringBuilder(256);
         final Formatter formatter = new Formatter(sb, Locale.US);
-        formatter.format("%08x", nounceCount);
+        formatter.format("%08x", Long.valueOf(nounceCount));
         formatter.close();
         final String nc = sb.toString();
 



Mime
View raw message