mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix npe while conversion of psi to compiler element
This commit is contained in:
@@ -186,9 +186,14 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceService {
|
||||
if (myDirtyScope.contains(vFile)) {
|
||||
return null;
|
||||
}
|
||||
CompilerElement[] compilerElements = place == ElementPlace.SRC
|
||||
? new CompilerElement[]{adapter.asCompilerElement(element)}
|
||||
: adapter.libraryElementAsCompilerElements(element);
|
||||
CompilerElement[] compilerElements;
|
||||
if (place == ElementPlace.SRC) {
|
||||
final CompilerElement compilerElement = adapter.asCompilerElement(element);
|
||||
compilerElements = compilerElement == null ? CompilerElement.EMPTY_ARRAY : new CompilerElement[]{compilerElement};
|
||||
}
|
||||
else {
|
||||
compilerElements = adapter.libraryElementAsCompilerElements(element);
|
||||
}
|
||||
if (compilerElements.length == 0) return null;
|
||||
|
||||
synchronized (myLock) {
|
||||
|
||||
Reference in New Issue
Block a user