Skip to content

Commit

Permalink
Fix NPE in Hibernate Search devconsole
Browse files Browse the repository at this point in the history
(cherry picked from commit 463c174)
  • Loading branch information
yrodiere authored and gsmet committed Nov 1, 2022
1 parent b5b794c commit 0ec6813
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public Supplier<HibernateSearchSupplier.IndexedPersistenceUnits> infoSupplier(
Map<String, HibernateSearchElasticsearchRuntimeConfigPersistenceUnit> puConfigs = runtimeConfig
.getAllPersistenceUnitConfigsAsMap();
Set<String> activePersistenceUnitNames = persistenceUnitNames.stream()
.filter(name -> puConfigs.get(name).active.orElse(true))
.filter(name -> {
var puConfig = puConfigs.get(name);
return puConfig == null || puConfig.active.orElse(true);
})
.collect(Collectors.toCollection(LinkedHashSet::new));
return new HibernateSearchSupplier(activePersistenceUnitNames);
}
Expand Down

0 comments on commit 0ec6813

Please sign in to comment.