mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
fix get() bug in NBConfiguration
This commit is contained in:
parent
380b3cbae5
commit
b395f14918
@ -97,6 +97,7 @@ public class NBConfiguration {
|
||||
public <T> T get(String name) {
|
||||
Param<T> param = (Param<T>)model.getNamedParams().get(name);
|
||||
Object object = this.data.get(name);
|
||||
object=object!=null?object: param.getDefaultValue();
|
||||
if (param.type.isInstance(object)) {
|
||||
return (T) object;
|
||||
} else if (param.type.isAssignableFrom(object.getClass())) {
|
||||
|
Loading…
Reference in New Issue
Block a user