mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-11-26 02:30:39 -06:00
minor opdef fix
This commit is contained in:
parent
0880f0cd58
commit
ada7aaadc6
@ -80,12 +80,14 @@ public class OpDef implements OpTemplate {
|
||||
Map<String, T> map = new LinkedHashMap<>();
|
||||
for (String pname : getParams().keySet()) {
|
||||
Object object = getParams().get(pname);
|
||||
if (type.isAssignableFrom(object.getClass())) {
|
||||
map.put(pname, type.cast(object));
|
||||
} else {
|
||||
throw new RuntimeException("With param named '" + pname + "" +
|
||||
if (object != null) {
|
||||
if (type.isAssignableFrom(object.getClass())) {
|
||||
map.put(pname, type.cast(object));
|
||||
} else {
|
||||
throw new RuntimeException("With param named '" + pname + "" +
|
||||
"' You can't assign an object of type '" + object.getClass().getSimpleName() + "" +
|
||||
"' to '" + type.getSimpleName() + "'. Maybe the YAML format is suggesting the wrong type.");
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
|
Loading…
Reference in New Issue
Block a user