diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java index 5c43287fb47..eb3fc26e7d1 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java @@ -125,9 +125,6 @@ public class RESTServer implements Constants { static void addCSRFFilter(ServletContextHandler ctxHandler, Configuration conf) { restCSRFEnabled = conf.getBoolean(REST_CSRF_ENABLED_KEY, REST_CSRF_ENABLED_DEFAULT); if (restCSRFEnabled) { - Set restCsrfMethodsToIgnore = new HashSet<>(); - restCsrfMethodsToIgnore.addAll(getTrimmedStringList(conf, - REST_CSRF_METHODS_TO_IGNORE_KEY, REST_CSRF_METHODS_TO_IGNORE_DEFAULT)); Map restCsrfParams = RestCsrfPreventionFilter .getFilterParams(conf, "hbase.rest-csrf."); FilterHolder holder = new FilterHolder(); diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java index bcc1581c23c..b18fd632783 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java @@ -129,11 +129,11 @@ public class NamespacesInstanceModel implements Serializable, ProtobufMessageHan sb.append(namespaceName); sb.append("\'"); if(properties != null){ - for(String key: properties.keySet()){ + for (Map.Entry entry : properties.entrySet()) { sb.append(", "); - sb.append(key); + sb.append(entry.getKey()); sb.append(" => '"); - sb.append(properties.get(key)); + sb.append(entry.getValue()); sb.append("\'"); } } @@ -145,10 +145,11 @@ public class NamespacesInstanceModel implements Serializable, ProtobufMessageHan public byte[] createProtobufOutput() { NamespaceProperties.Builder builder = NamespaceProperties.newBuilder(); if(properties != null){ - for(String key: properties.keySet()){ + for (Map.Entry entry : properties.entrySet()) { + String key = entry.getKey(); NamespaceProperties.Property.Builder property = NamespaceProperties.Property.newBuilder(); property.setKey(key); - property.setValue(properties.get(key)); + property.setValue(entry.getValue()); builder.addProps(property); } }