hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chia7...@apache.org
Subject hbase git commit: HBASE-18315 Eliminate the findbugs warnings for hbase-rest
Date Tue, 08 Aug 2017 02:50:17 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 501176d40 -> 18d29e479


HBASE-18315 Eliminate the findbugs warnings for hbase-rest


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/18d29e47
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/18d29e47
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/18d29e47

Branch: refs/heads/branch-2
Commit: 18d29e4794dd669fdde3520518979b9023daea79
Parents: 501176d
Author: Chia-Ping Tsai <chia7712@gmail.com>
Authored: Tue Aug 8 10:47:15 2017 +0800
Committer: Chia-Ping Tsai <chia7712@gmail.com>
Committed: Tue Aug 8 10:47:15 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/rest/RESTServer.java    |  3 ---
 .../hadoop/hbase/rest/model/NamespacesInstanceModel.java | 11 ++++++-----
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/18d29e47/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
----------------------------------------------------------------------
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 5c43287..eb3fc26 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<String> restCsrfMethodsToIgnore = new HashSet<>();
-      restCsrfMethodsToIgnore.addAll(getTrimmedStringList(conf,
-          REST_CSRF_METHODS_TO_IGNORE_KEY, REST_CSRF_METHODS_TO_IGNORE_DEFAULT));
       Map<String, String> restCsrfParams = RestCsrfPreventionFilter
           .getFilterParams(conf, "hbase.rest-csrf.");
       FilterHolder holder = new FilterHolder();

http://git-wip-us.apache.org/repos/asf/hbase/blob/18d29e47/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
----------------------------------------------------------------------
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 bcc1581..b18fd63 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<String, String> 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<String, String> 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);
       }
     }


Mime
View raw message