diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationFieldsBase.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationFieldsBase.java index 9007c20ccab..4d143fd9582 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationFieldsBase.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationFieldsBase.java @@ -752,7 +752,7 @@ public abstract class TestConfigurationFieldsBase { // Check only for numerical values. if (StringUtils.isNumeric(ent.getValue())) { String crtValue = - filteredValues.putIfAbsent(ent.getValue(), ent.getKey()); + filteredValues.put(ent.getValue(), ent.getKey()); assertTrue("Parameters " + ent.getKey() + " and " + crtValue + " are using the same default value!", crtValue == null); }