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() {
266266 if (this .managedTypes != null ) {
267267 entityManagerFactoryBean .setManagedTypes (this .managedTypes );
268268 }
269- else {
270- setPackagesToScan (entityManagerFactoryBean );
269+ else if ( this . packagesToScan != null ) {
270+ entityManagerFactoryBean . setPackagesToScan (this . packagesToScan );
271271 }
272272 Map <String , ?> jpaProperties = EntityManagerFactoryBuilder .this .jpaPropertiesFactory .apply (this .dataSource );
273273 entityManagerFactoryBean .getJpaPropertyMap ().putAll (new LinkedHashMap <>(jpaProperties ));
@@ -289,14 +289,6 @@ public LocalContainerEntityManagerFactoryBean build() {
289289 return entityManagerFactoryBean ;
290290 }
291291
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-
300292 }
301293
302294}
You can’t perform that action at this time.
0 commit comments