File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
tzatziki-spring-jpa/src/main/java/com/decathlon/tzatziki/steps Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 19
19
import javax .sql .DataSource ;
20
20
import java .lang .reflect .Type ;
21
21
import java .lang .reflect .TypeVariable ;
22
- import java .util .ArrayList ;
23
- import java .util .Collection ;
24
- import java .util .List ;
25
- import java .util .Map ;
22
+ import java .util .*;
26
23
import java .util .function .Function ;
27
24
import java .util .stream .Collectors ;
28
25
import java .util .stream .Stream ;
@@ -68,7 +65,7 @@ public void before() {
68
65
}
69
66
70
67
if (entityClassByTableName == null ) {
71
- entityClassByTableName = entityManagerFactories .stream ()
68
+ entityClassByTableName = Optional . ofNullable ( entityManagerFactories ). orElse ( Collections . emptyList ()) .stream ()
72
69
.map (LocalContainerEntityManagerFactoryBean ::getPersistenceUnitInfo )
73
70
.map (PersistenceUnitInfo ::getManagedClassNames )
74
71
.flatMap (Collection ::stream )
You can’t perform that action at this time.
0 commit comments