summaryrefslogtreecommitdiff
path: root/platform/core-api/src/com/intellij/openapi/project/DumbService.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/core-api/src/com/intellij/openapi/project/DumbService.java')
-rw-r--r--platform/core-api/src/com/intellij/openapi/project/DumbService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/core-api/src/com/intellij/openapi/project/DumbService.java b/platform/core-api/src/com/intellij/openapi/project/DumbService.java
index ad5c36a5d3e2..a0f5b43ce308 100644
--- a/platform/core-api/src/com/intellij/openapi/project/DumbService.java
+++ b/platform/core-api/src/com/intellij/openapi/project/DumbService.java
@@ -87,13 +87,15 @@ public abstract class DumbService {
}
@Nullable
- public <T> T tryRunReadActionInSmartMode(@NotNull Computable<T> task, @NotNull String notification) {
+ public <T> T tryRunReadActionInSmartMode(@NotNull Computable<T> task, @Nullable String notification) {
if (ApplicationManager.getApplication().isReadAccessAllowed()) {
try {
return task.compute();
}
catch (IndexNotReadyException e) {
- showDumbModeNotification(notification);
+ if (notification != null) {
+ showDumbModeNotification(notification);
+ }
return null;
}
}