Commit c31d45dd authored by Julian Zobel's avatar Julian Zobel 🦄
Browse files

To prevent later NPEs, throw an error if the input value is null in Default Configurator

parent bc716265
......@@ -867,10 +867,13 @@ public class DefaultConfigurator implements Configurator {
@SuppressWarnings("unchecked")
public static <T extends Number> T parseNumber(String value,
Class<T> targetClass) {
assert value != null;
//assert value != null;
if(value == null)
System.out.println("");
if(value == null) {
System.out.println(targetClass);
throw new UnsupportedOperationException("[DefaultConfigurator]: value cannot be null! " );
}
String number = value;
double factor = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment