From 73054957f8283f53cc560c017c43f3b5b646bb3c Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Wed, 7 Nov 2012 02:47:01 +0000 Subject: [PATCH] Unnecessary casts git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406424 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/http/impl/client/cache/TestBasicHttpCache.java | 4 ++-- .../apache/http/impl/conn/TestDefaultHttpResponseParser.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java b/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java index 6a61d8b38..846907bce 100644 --- a/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java +++ b/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestBasicHttpCache.java @@ -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\""); diff --git a/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java b/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java index 4286a56c9..04abd81ae 100644 --- a/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java +++ b/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java @@ -67,7 +67,7 @@ public class TestDefaultHttpResponseParser { 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());