Defensive null check in case Hibernate autoconfig is off
If the Hibernate autoconfig is not used to create an EntityManager then I suppose it's possible that the JpaProperties might be null when everything else is ready for the event to be published. There's no test case because I think it's a corner case. Fxies gh-1075
This commit is contained in:
parent
32a220da8f
commit
8d6f003e9a
|
|
@ -73,6 +73,9 @@ class DataSourceInitializedPublisher implements BeanPostProcessor {
|
|||
}
|
||||
|
||||
private boolean isInitializingDatabase() {
|
||||
if (this.properties == null) {
|
||||
return true; // better safe than sorry
|
||||
}
|
||||
Map<String, String> hibernate = this.properties
|
||||
.getHibernateProperties(this.dataSource);
|
||||
if (hibernate.containsKey("hibernate.hbm2ddl.auto")) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue