From c7c70ec451d9ea14b3031ca9eafe075594cf948b Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Tue, 14 Jan 2014 14:52:13 +0000 Subject: [PATCH] Convert control statement bodies to block. git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1558060 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/http/client/cache/HttpCacheEntry.java | 3 ++- .../org/apache/http/impl/client/cache/TestCachingExec.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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'; } }));