do not try to merge Injection with no InjectionPlace

This commit is contained in:
Alexander Kass
2016-05-31 12:23:05 +03:00
parent c3a00b0e5b
commit 6246749b47
@@ -410,7 +410,12 @@ public class Configuration extends SimpleModificationTracker implements Persiste
}
}
main: for (BaseInjection other : importingInjections) {
final Set<BaseInjection> matchingInjections = JBIterable.of(other.getInjectionPlaces())
InjectionPlace[] places = other.getInjectionPlaces();
if (places.length == 0) {
if (!existingInjections.contains(other)) newInjections.add(other);
continue;
}
final Set<BaseInjection> matchingInjections = JBIterable.of(places)
.flatten(o -> JBIterable.from(placeMap.get(o))).toSet();
if (matchingInjections.isEmpty()) {
newInjections.add(other);