Skip to content

Commit

Permalink
AzureTaskManager may be not ready at preloading.
Browse files Browse the repository at this point in the history
#6939: the return value of "com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager.getInstance()" is null
  • Loading branch information
wangmingliang-ms committed Sep 26, 2022
1 parent 2fc1184 commit d691dcc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import com.intellij.database.dataSource.DatabaseDriverManager;
import com.intellij.database.dataSource.DatabaseDriverManagerImpl;
import com.intellij.database.dataSource.url.ui.UrlPropertiesPanel;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.PreloadingActivity;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.util.JDOMUtil;
import com.intellij.openapi.util.registry.Registry;
import com.microsoft.azure.toolkit.intellij.common.IntelliJAzureIcons;
import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager;
import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.reflect.FieldUtils;
Expand All @@ -38,7 +38,7 @@ public class DbToolsWorkaround extends PreloadingActivity {

@Override
public void preload(@Nonnull ProgressIndicator indicator) {
AzureTaskManager.getInstance().runOnPooledThread(() -> {
ApplicationManager.getApplication().executeOnPooledThread(() -> {
DbToolsWorkaround.makeAccountShowAtTop();
loadMongoDriver();
loadCassandraDriver();
Expand Down

0 comments on commit d691dcc

Please sign in to comment.