Polish JpaProperties.determineDdlAuto()

Closes gh-13036
pull/13161/head
Johnny Lim 7 years ago committed by Stephane Nicoll
parent b4258ea908
commit aa60d60b8a

@ -240,17 +240,11 @@ public class JpaProperties {
private String determineDdlAuto(Map<String, String> existing,
Supplier<String> defaultDdlAuto) {
if (!existing.containsKey("hibernate.hbm2ddl.auto")) {
String ddlAuto = (this.ddlAuto != null ? this.ddlAuto
: defaultDdlAuto.get());
if (!"none".equals(ddlAuto)) {
return ddlAuto;
}
String ddlAuto = existing.get("hibernate.hbm2ddl.auto");
if (ddlAuto != null) {
return ddlAuto;
}
if (existing.containsKey("hibernate.hbm2ddl.auto")) {
return existing.get("hibernate.hbm2ddl.auto");
}
return "none";
return this.ddlAuto != null ? this.ddlAuto : defaultDdlAuto.get();
}
}

Loading…
Cancel
Save