mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-139675 - NPE: NavigationGutterIconBuilder.calcPsiTargets / add assertion, use IAE
This commit is contained in:
+4
-1
@@ -323,7 +323,10 @@ public class NavigationGutterIconBuilder<T> {
|
||||
final List<SmartPsiElementPointer> list = new ArrayList<>(targets.size());
|
||||
for (final T target : targets) {
|
||||
for (final PsiElement psiElement : converter.fun(target)) {
|
||||
assert psiElement != null : converter + " returned null element";
|
||||
if (psiElement == null) {
|
||||
throw new IllegalArgumentException(converter + " returned null element");
|
||||
}
|
||||
|
||||
if (elements.add(psiElement) && psiElement.isValid()) {
|
||||
list.add(manager.createSmartPsiElementPointer(psiElement));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user