EA-455688 - PIEAE: LeafPsiElement.invalid

GitOrigin-RevId: a27ca1abe951be299c4056e942530beee12d7da7
This commit is contained in:
Anna Kozlova
2022-02-18 10:43:32 +00:00
committed by intellij-monorepo-bot
parent 7839157e09
commit 999c684682
@@ -1,4 +1,4 @@
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.byteCodeViewer;
import com.intellij.codeInsight.lookup.LookupManager;
@@ -83,7 +83,10 @@ final class ShowByteCodeAction extends AnAction implements UpdateInBackground {
isMarkedForCompilation(project, virtualFile)) {
myErrorTitle = JavaByteCodeViewerBundle.message("class.file.may.be.out.of.date");
}
myByteCode = ReadAction.compute(() -> ByteCodeViewerManager.getByteCode(psiElement));
myByteCode = ReadAction.compute(() -> {
PsiElement targetElement = element.getElement();
return targetElement != null ? ByteCodeViewerManager.getByteCode(targetElement) : null;
});
}
@Override