hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1406424 - in /httpcomponents/httpclient/trunk: httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java
Date Wed, 07 Nov 2012 02:47:01 GMT
Author: sebb
Date: Wed Nov  7 02:47:01 2012
New Revision: 1406424

URL: http://svn.apache.org/viewvc?rev=1406424&view=rev
Log:
Unnecessary casts

Modified:
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java?rev=1406424&r1=1406423&r2=1406424&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java
Wed Nov  7 02:47:01 2012
@@ -234,7 +234,7 @@ public class TestBasicHttpCache {
         Date responseReceived = new Date(now.getTime() - 1 * 1000L);
 
         HttpResponse originResponse = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK,
"OK");
-        originResponse.setEntity(HttpTestUtils.makeBody((int) CacheConfig.DEFAULT_MAX_OBJECT_SIZE_BYTES
+ 1));
+        originResponse.setEntity(HttpTestUtils.makeBody(CacheConfig.DEFAULT_MAX_OBJECT_SIZE_BYTES
+ 1));
         originResponse.setHeader("Cache-Control","public, max-age=3600");
         originResponse.setHeader("Date", DateUtils.formatDate(responseGenerated));
         originResponse.setHeader("ETag", "\"etag\"");
@@ -256,7 +256,7 @@ public class TestBasicHttpCache {
         Date responseReceived = new Date(now.getTime() - 1 * 1000L);
 
         HttpResponse originResponse = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK,
"OK");
-        originResponse.setEntity(HttpTestUtils.makeBody((int) CacheConfig.DEFAULT_MAX_OBJECT_SIZE_BYTES
- 1));
+        originResponse.setEntity(HttpTestUtils.makeBody(CacheConfig.DEFAULT_MAX_OBJECT_SIZE_BYTES
- 1));
         originResponse.setHeader("Cache-Control","public, max-age=3600");
         originResponse.setHeader("Date", DateUtils.formatDate(responseGenerated));
         originResponse.setHeader("ETag", "\"etag\"");

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java?rev=1406424&r1=1406423&r2=1406424&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java
Wed Nov  7 02:47:01 2012
@@ -67,7 +67,7 @@ public class TestDefaultHttpResponsePars
                 new DefaultHttpResponseFactory(),
                 params);
 
-        HttpResponse response = (HttpResponse) parser.parse();
+        HttpResponse response = parser.parse();
         Assert.assertNotNull(response);
         Assert.assertEquals(HttpVersion.HTTP_1_1, response.getProtocolVersion());
         Assert.assertEquals(200, response.getStatusLine().getStatusCode());



Mime
View raw message