@Override
protected void computeResult() {
+ Map<NamedResource, Collection<NamedResource>> currentElements = null;
+ try {
+ currentElements = elements.get();
+ } catch (InterruptedException | ExecutionException e) {
+ LOGGER.error("Could not get currentElements", e);
+ throw new RuntimeException("Could not get currentElements", e);
+ }
for (Map.Entry<NamedResource, Combo> combos : mappingCombos.entrySet()) {
NamedResource resource = combos.getKey();
Combo c = combos.getValue();
String item = c.getItem(c.getSelectionIndex());
-
+ Collection<NamedResource> collection = currentElements.get(resource);
Map<String, Resource> map = possibleMappings.get(resource);
Resource newMapping = map.get(item);
results.compute(newMapping, (t, u) -> {
if (u == null) {
u = new HashSet<>();
}
- u.add(resource);
+ u.addAll(collection);
return u;
});
}