Improved enum parsing.

This commit is contained in:
Christian P. MOMON 2021-12-09 12:53:19 +01:00
parent ce2342008a
commit 8342850d13

View file

@ -385,7 +385,16 @@ public class Configuration extends PathPropertyList
{
ProbeMode result;
result = ProbeMode.valueOf(StringUtils.upperCase(get("conf.probe.mode")));
String value = get("conf.probe.mode");
if (StringUtils.isBlank(value))
{
result = null;
}
else
{
result = ProbeMode.valueOf(StringUtils.upperCase(value));
}
//
return result;