javac ast indices is applied for lambda search
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 28 Sep 2016 15:30:40 +0000 (18:30 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 28 Sep 2016 15:30:40 +0000 (18:30 +0300)
java/java-indexing-impl/src/com/intellij/compiler/JavaFunctionalExpressionCompilerSearchAdapter.java

index a4a96a5d1cce0f2b4edf60cb0fca4386cbf862da..07ae67a735c0e71a14048606c9cdd06ecd46ddbe 100644 (file)
@@ -40,6 +40,7 @@ public class JavaFunctionalExpressionCompilerSearchAdapter implements CompilerSe
   @NotNull
   @Override
   public CompilerElement[] libraryElementAsCompilerElements(@NotNull PsiElement psi) {
-    return new CompilerElement[] {asCompilerElement(psi)};
+    final CompilerElement element = asCompilerElement(psi);
+    return element == null ? CompilerElement.EMPTY_ARRAY : new CompilerElement[] {element};
   }
 }