You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by el...@apache.org on 2018/06/14 16:26:06 UTC

[trafficcontrol] 04/07: updated to solve the PMD error

This is an automated email from the ASF dual-hosted git repository.

elsloo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit b186abd3d5d1316f4a8b2a2ea4531b0304119f3e
Author: Dewayne Richardson <de...@apache.org>
AuthorDate: Wed May 23 14:44:59 2018 -0600

    updated to solve the PMD error
---
 .../traffic_control/traffic_router/core/util/ProtectedFetcher.java  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/util/ProtectedFetcher.java b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/util/ProtectedFetcher.java
index ce019cd..0edb429 100644
--- a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/util/ProtectedFetcher.java
+++ b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/util/ProtectedFetcher.java
@@ -40,10 +40,8 @@ public class ProtectedFetcher extends Fetcher {
 	}
 
 	private HttpURLConnection extractCookie(final HttpURLConnection http) throws IOException {
-		if (http != null) {
-			if (http.getHeaderField("Set-Cookie") != null) {
-				setCookie(HttpCookie.parse(http.getHeaderField("Set-Cookie")).get(0));
-			}
+		if ((http != null) &&  (http.getHeaderField("Set-Cookie") != null)) {
+			setCookie(HttpCookie.parse(http.getHeaderField("Set-Cookie")).get(0));
 		}
 		return http;
 	}

-- 
To stop receiving notification emails like this one, please contact
elsloo@apache.org.