From 43541a18907d2303b708ae27a9a2cb5df891da4f Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Wed, 20 Jun 2018 12:38:59 -0700 Subject: [PATCH] HADOOP-15551. Avoid use of Arrays.stream in Configuration.addTags --- .../main/java/org/apache/hadoop/conf/Configuration.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 19bd5dab22a..b1125e588c0 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>, 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) {