HADOOP-16962. Making getBoolean log warning message for unrecognized value. Contributed by Ctest.

This commit is contained in:
Ayush Saxena 2020-04-09 23:29:48 +05:30
parent 061afcdf30
commit 5746533cde

View File

@ -1690,7 +1690,11 @@ public boolean getBoolean(String name, boolean defaultValue) {
return true;
else if (StringUtils.equalsIgnoreCase("false", valueString))
return false;
else return defaultValue;
else {
LOG.warn("Invalid value for boolean: " + valueString +
", choose default value: " + defaultValue + " for " + name);
return defaultValue;
}
}
/**