From 28781682babd516caeb83f148d89fd00bff8fa4c Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 10 Jun 2020 15:31:19 +0200 Subject: [PATCH] special AlreadyDisposedException must be used here instead of generic IllegalStateException GitOrigin-RevId: 6a8f6071465839f5a39ee2c79d4451e3016633c1 --- .../src/com/intellij/openapi/project/impl/ProjectImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java index e3e49714db4f..b7a02fc246c2 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java @@ -35,6 +35,7 @@ import com.intellij.openapi.wm.WindowManager; import com.intellij.openapi.wm.impl.FrameTitleBuilder; import com.intellij.project.ProjectStoreOwner; import com.intellij.psi.impl.DebugUtil; +import com.intellij.serviceContainer.AlreadyDisposedException; import com.intellij.serviceContainer.ComponentManagerImpl; import com.intellij.util.PathUtil; import com.intellij.util.TimedReference; @@ -375,7 +376,7 @@ public class ProjectImpl extends ComponentManagerImpl implements ProjectEx, Proj @ApiStatus.Internal public final @NotNull Disposable getEarlyDisposable() { if (isDisposed()) { - throw new IllegalStateException(this + " is disposed already"); + throw new AlreadyDisposedException(this + " is disposed already"); } // maybe null only if disposed, but this condition is checked above