From f699ac47ee0818880a82a9e40659d98ecfd3487c Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Thu, 4 May 2017 14:32:38 +0300 Subject: [PATCH] javac ast indices: do not catch control flow exceptions --- .../compiler/backwardRefs/CompilerReferenceServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java b/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java index dd670ce92a6f..467529d4ecbb 100644 --- a/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java +++ b/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java @@ -31,6 +31,7 @@ import com.intellij.openapi.compiler.CompilationStatusListener; import com.intellij.openapi.compiler.CompileContext; import com.intellij.openapi.compiler.CompileScope; import com.intellij.openapi.compiler.CompilerManager; +import com.intellij.openapi.diagnostic.ControlFlowException; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.fileTypes.FileType; @@ -762,8 +763,8 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceServiceEx imp @Nullable private T onException(@NotNull Exception e, @NotNull String actionName) { - if (e instanceof ProcessCanceledException) { - throw (ProcessCanceledException)e; + if (e instanceof ControlFlowException) { + throw (RuntimeException)e; } LOG.error("an exception during " + actionName + " calculation", e);