HADOOP-16962. Making getBoolean
log warning message for unrecognized value. Contributed by Ctest.
This commit is contained in:
parent
061afcdf30
commit
5746533cde
@ -1690,7 +1690,11 @@ public boolean getBoolean(String name, boolean defaultValue) {
|
|||||||
return true;
|
return true;
|
||||||
else if (StringUtils.equalsIgnoreCase("false", valueString))
|
else if (StringUtils.equalsIgnoreCase("false", valueString))
|
||||||
return false;
|
return false;
|
||||||
else return defaultValue;
|
else {
|
||||||
|
LOG.warn("Invalid value for boolean: " + valueString +
|
||||||
|
", choose default value: " + defaultValue + " for " + name);
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user