Refactor iterator of Map with Java8's Map.forEach

See gh-1459
This commit is contained in:
diguage
2017-06-13 17:53:13 +08:00
committed by Stephane Nicoll
parent 7018804e84
commit 1ef5f61ab2
18 changed files with 72 additions and 130 deletions

View File

@@ -325,11 +325,11 @@ public abstract class AbstractEntityManagerFactoryBean implements
}
Map<String, ?> vendorPropertyMap = this.jpaVendorAdapter.getJpaPropertyMap();
if (vendorPropertyMap != null) {
for (Map.Entry<String, ?> entry : vendorPropertyMap.entrySet()) {
if (!this.jpaPropertyMap.containsKey(entry.getKey())) {
this.jpaPropertyMap.put(entry.getKey(), entry.getValue());
vendorPropertyMap.forEach((key, value) -> {
if (!this.jpaPropertyMap.containsKey(key)) {
this.jpaPropertyMap.put(key, value);
}
}
});
}
if (this.entityManagerFactoryInterface == null) {
this.entityManagerFactoryInterface = this.jpaVendorAdapter.getEntityManagerFactoryInterface();