From 6246749b4726ac0d915b26ae515bdcb306db562f Mon Sep 17 00:00:00 2001 From: Alexander Kass Date: Mon, 30 May 2016 16:21:12 +0300 Subject: [PATCH] do not try to merge Injection with no InjectionPlace --- .../org/intellij/plugins/intelliLang/Configuration.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/Configuration.java b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/Configuration.java index 42c7ce50f11a..2765099e7feb 100644 --- a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/Configuration.java +++ b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/Configuration.java @@ -410,7 +410,12 @@ public class Configuration extends SimpleModificationTracker implements Persiste } } main: for (BaseInjection other : importingInjections) { - final Set matchingInjections = JBIterable.of(other.getInjectionPlaces()) + InjectionPlace[] places = other.getInjectionPlaces(); + if (places.length == 0) { + if (!existingInjections.contains(other)) newInjections.add(other); + continue; + } + final Set matchingInjections = JBIterable.of(places) .flatten(o -> JBIterable.from(placeMap.get(o))).toSet(); if (matchingInjections.isEmpty()) { newInjections.add(other);