HADOOP-15551. Avoid use of Arrays.stream in Configuration.addTags

Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/43541a18
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/43541a18
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/43541a18

Branch: refs/heads/HDFS-12943
Commit: 43541a18907d2303b708ae27a9a2cb5df891da4f
Parents: 32f867a
Author: Todd Lipcon <t...@apache.org>
Authored: Wed Jun 20 12:38:59 2018 -0700
Committer: Todd Lipcon <t...@apache.org>
Committed: Wed Jun 20 16:43:10 2018 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/conf/Configuration.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/43541a18/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
index 19bd5da..b1125e5 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
@@ -3189,25 +3189,25 @@ public class Configuration implements 
Iterable<Map.Entry<String,String>>,
       if (prop.containsKey(CommonConfigurationKeys.HADOOP_TAGS_SYSTEM)) {
         String systemTags = prop.getProperty(CommonConfigurationKeys
             .HADOOP_TAGS_SYSTEM);
-        Arrays.stream(systemTags.split(",")).forEach(tag -> TAGS.add(tag));
+        TAGS.addAll(Arrays.asList(systemTags.split(",")));
       }
       // Get all custom tags
       if (prop.containsKey(CommonConfigurationKeys.HADOOP_TAGS_CUSTOM)) {
         String customTags = prop.getProperty(CommonConfigurationKeys
             .HADOOP_TAGS_CUSTOM);
-        Arrays.stream(customTags.split(",")).forEach(tag -> TAGS.add(tag));
+        TAGS.addAll(Arrays.asList(customTags.split(",")));
       }
 
       if (prop.containsKey(CommonConfigurationKeys.HADOOP_SYSTEM_TAGS)) {
         String systemTags = prop.getProperty(CommonConfigurationKeys
             .HADOOP_SYSTEM_TAGS);
-        Arrays.stream(systemTags.split(",")).forEach(tag -> TAGS.add(tag));
+        TAGS.addAll(Arrays.asList(systemTags.split(",")));
       }
       // Get all custom tags
       if (prop.containsKey(CommonConfigurationKeys.HADOOP_CUSTOM_TAGS)) {
         String customTags = prop.getProperty(CommonConfigurationKeys
             .HADOOP_CUSTOM_TAGS);
-        Arrays.stream(customTags.split(",")).forEach(tag -> TAGS.add(tag));
+        TAGS.addAll(Arrays.asList(customTags.split(",")));
       }
 
     } catch (Exception ex) {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to