Handle non-string properties

pull/705/head
Brett Wooldridge 9 years ago
parent aabc47737f
commit 5f3c97702f

@ -49,12 +49,12 @@ public final class PropertyElf
} }
List<Method> methods = Arrays.asList(target.getClass().getMethods()); List<Method> methods = Arrays.asList(target.getClass().getMethods());
properties.stringPropertyNames().forEach(key -> { properties.forEach((key, value) -> {
if (target instanceof HikariConfig && key.startsWith("dataSource.")) { if (target instanceof HikariConfig && key.toString().startsWith("dataSource.")) {
((HikariConfig) target).addDataSourceProperty(key.substring("dataSource.".length()), properties.getProperty(key)); ((HikariConfig) target).addDataSourceProperty(key.toString().substring("dataSource.".length()), value);
} }
else { else {
setProperty(target, key, properties.getProperty(key), methods); setProperty(target, key.toString(), value, methods);
} }
}); });
} }

Loading…
Cancel
Save