Unnecessary casts

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406424 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-11-07 02:47:01 +00:00
parent 838a106e90
commit 73054957f8
2 changed files with 3 additions and 3 deletions

View File

@ -234,7 +234,7 @@ public class TestBasicHttpCache {
Date responseReceived = new Date(now.getTime() - 1 * 1000L); Date responseReceived = new Date(now.getTime() - 1 * 1000L);
HttpResponse originResponse = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK"); 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("Cache-Control","public, max-age=3600");
originResponse.setHeader("Date", DateUtils.formatDate(responseGenerated)); originResponse.setHeader("Date", DateUtils.formatDate(responseGenerated));
originResponse.setHeader("ETag", "\"etag\""); originResponse.setHeader("ETag", "\"etag\"");
@ -256,7 +256,7 @@ public class TestBasicHttpCache {
Date responseReceived = new Date(now.getTime() - 1 * 1000L); Date responseReceived = new Date(now.getTime() - 1 * 1000L);
HttpResponse originResponse = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK"); 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("Cache-Control","public, max-age=3600");
originResponse.setHeader("Date", DateUtils.formatDate(responseGenerated)); originResponse.setHeader("Date", DateUtils.formatDate(responseGenerated));
originResponse.setHeader("ETag", "\"etag\""); originResponse.setHeader("ETag", "\"etag\"");

View File

@ -67,7 +67,7 @@ public class TestDefaultHttpResponseParser {
new DefaultHttpResponseFactory(), new DefaultHttpResponseFactory(),
params); params);
HttpResponse response = (HttpResponse) parser.parse(); HttpResponse response = parser.parse();
Assert.assertNotNull(response); Assert.assertNotNull(response);
Assert.assertEquals(HttpVersion.HTTP_1_1, response.getProtocolVersion()); Assert.assertEquals(HttpVersion.HTTP_1_1, response.getProtocolVersion());
Assert.assertEquals(200, response.getStatusLine().getStatusCode()); Assert.assertEquals(200, response.getStatusLine().getStatusCode());