put all values into dynamic properties map

This commit is contained in:
russellb337 2015-09-04 15:24:36 -07:00
parent 435ce7b9d5
commit d22398eb73

View File

@ -324,10 +324,7 @@ public class CodegenConfigurator {
@JsonAnySetter @JsonAnySetter
public CodegenConfigurator addDynamicProperty(String name, Object value) { public CodegenConfigurator addDynamicProperty(String name, Object value) {
if (value instanceof String) { dynamicProperties.put(name, value.toString());
dynamicProperties.put(name, (String) value);
}
return this; return this;
} }
@ -388,7 +385,7 @@ public class CodegenConfigurator {
public static CodegenConfigurator fromFile(String configFile) { public static CodegenConfigurator fromFile(String configFile) {
if(isNotEmpty(configFile)) { if (isNotEmpty(configFile)) {
try { try {
CodegenConfigurator result = Json.mapper().readValue(new File(configFile), CodegenConfigurator.class); CodegenConfigurator result = Json.mapper().readValue(new File(configFile), CodegenConfigurator.class);
return result; return result;