diff --git a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowByteCodeAction.java b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowByteCodeAction.java index 2b342ce17f2a..a3a7b7dfcad4 100644 --- a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowByteCodeAction.java +++ b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowByteCodeAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataContext; -import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.compiler.CompilerManager; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.progress.ProgressIndicator; @@ -32,7 +32,6 @@ import com.intellij.openapi.roots.ProjectRootManager; import com.intellij.openapi.ui.Messages; import com.intellij.openapi.ui.popup.JBPopup; import com.intellij.openapi.ui.popup.JBPopupFactory; -import com.intellij.openapi.util.Computable; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.*; @@ -99,12 +98,7 @@ public class ShowByteCodeAction extends AnAction { myErrorTitle = "Class File Out-Of-Date"; } else { - myByteCode = ApplicationManager.getApplication().runReadAction(new Computable() { - @Override - public String compute() { - return ByteCodeViewerManager.getByteCode(psiElement); - } - }); + myByteCode = ReadAction.compute(() -> ByteCodeViewerManager.getByteCode(psiElement)); } }