From af3aa44e6c3fca4fa0614d846418e3bcfeb262f8 Mon Sep 17 00:00:00 2001 From: Owen Stephens Date: Tue, 16 Jan 2018 18:27:13 +0000 Subject: [PATCH] Tidy up for codacy --- main/src/com/google/refine/commands/HttpHeadersSupport.java | 6 +++--- .../commands/column/AddColumnByFetchingURLsCommand.java | 1 - .../column/ColumnAdditionByFetchingURLsOperation.java | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/main/src/com/google/refine/commands/HttpHeadersSupport.java b/main/src/com/google/refine/commands/HttpHeadersSupport.java index 6b1690bbd..6bac9db5b 100644 --- a/main/src/com/google/refine/commands/HttpHeadersSupport.java +++ b/main/src/com/google/refine/commands/HttpHeadersSupport.java @@ -41,6 +41,8 @@ import com.google.refine.RefineServlet; abstract public class HttpHeadersSupport { + static final protected Map s_headers = new HashMap(); + static public class HttpHeaderInfo { final public String name; final public String header; @@ -52,9 +54,7 @@ abstract public class HttpHeadersSupport { this.defaultValue = defaultValue; } } - - static final protected Map s_headers = new HashMap(); - + static { registerHttpHeader("User-Agent", RefineServlet.FULLNAME); registerHttpHeader("Accept", "*/*"); diff --git a/main/src/com/google/refine/commands/column/AddColumnByFetchingURLsCommand.java b/main/src/com/google/refine/commands/column/AddColumnByFetchingURLsCommand.java index d6ae70d3d..ebf6a89e0 100644 --- a/main/src/com/google/refine/commands/column/AddColumnByFetchingURLsCommand.java +++ b/main/src/com/google/refine/commands/column/AddColumnByFetchingURLsCommand.java @@ -37,7 +37,6 @@ import javax.servlet.http.HttpServletRequest; import org.json.JSONObject; import org.json.JSONArray; -import java.util.Enumeration; import com.google.refine.commands.EngineDependentCommand; import com.google.refine.model.AbstractOperation; diff --git a/main/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperation.java b/main/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperation.java index 6799b782f..d231fad04 100644 --- a/main/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperation.java +++ b/main/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperation.java @@ -350,7 +350,6 @@ public class ColumnAdditionByFetchingURLsOperation extends EngineDependentOperat urlConnection.setRequestProperty(info.header, httpHeaders.get(headerLabel)); } } -// urlConnection.setRequestProperty(_headerKey, _headerValue); try { InputStream is = urlConnection.getInputStream();