File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,8 @@ public LocalContainerEntityManagerFactoryBean build() {
266
266
if (this .managedTypes != null ) {
267
267
entityManagerFactoryBean .setManagedTypes (this .managedTypes );
268
268
}
269
- else {
270
- setPackagesToScan (entityManagerFactoryBean );
269
+ else if ( this . packagesToScan != null ) {
270
+ entityManagerFactoryBean . setPackagesToScan (this . packagesToScan );
271
271
}
272
272
Map <String , ?> jpaProperties = EntityManagerFactoryBuilder .this .jpaPropertiesFactory .apply (this .dataSource );
273
273
entityManagerFactoryBean .getJpaPropertyMap ().putAll (new LinkedHashMap <>(jpaProperties ));
@@ -289,14 +289,6 @@ public LocalContainerEntityManagerFactoryBean build() {
289
289
return entityManagerFactoryBean ;
290
290
}
291
291
292
- // TODO: Review this. The test
293
- // HibernateJpaAutoConfigurationTests.usesManuallyDefinedLocalContainerEntityManagerFactoryBeanUsingBuilder
294
- // fails if an non-null assert is added
295
- @ SuppressWarnings ("NullAway" )
296
- private void setPackagesToScan (LocalContainerEntityManagerFactoryBean entityManagerFactoryBean ) {
297
- entityManagerFactoryBean .setPackagesToScan (this .packagesToScan );
298
- }
299
-
300
292
}
301
293
302
294
}
You can’t perform that action at this time.
0 commit comments