diff --git a/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java b/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java index 1d48fa67a..38ef49f53 100644 --- a/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java +++ b/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java @@ -132,8 +132,9 @@ public class HttpCacheEntry implements Serializable { */ private Date parseDate() { final Header dateHdr = getFirstHeader(HTTP.DATE_HEADER); - if (dateHdr == null) + if (dateHdr == null) { return null; + } return DateUtils.parseDate(dateHdr.getValue()); } diff --git a/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingExec.java b/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingExec.java index fecf3ba82..c583a4c4e 100644 --- a/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingExec.java +++ b/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingExec.java @@ -331,8 +331,9 @@ public class TestCachingExec extends TestCachingExecChain { throw new IOException("Response has been closed"); } - if (size.incrementAndGet() > maxlength.get()) + if (size.incrementAndGet() > maxlength.get()) { return -1; + } return 'y'; } }));