mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] preconfigure: create JDK outside of write action.
It looks like only addJdk requires write action Should improve EA-265774 GitOrigin-RevId: de76df74054e8f8cb404e2a8bfb4a8669830629a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bd762a3bf7
commit
ca58327e44
+2
-3
@@ -41,9 +41,8 @@ public final class JavaAwareProjectJdkTableImpl extends ProjectJdkTableImpl {
|
||||
if (homePath != null && javaSdk.isValidSdkHome(homePath)) {
|
||||
String suggestedName = JdkUtil.suggestJdkName(javaSdk.getVersionString(homePath));
|
||||
if (suggestedName != null) {
|
||||
ApplicationManager.getApplication().runWriteAction(
|
||||
() -> addJdk(javaSdk.createJdk(suggestedName, homePath, false))
|
||||
);
|
||||
Sdk jdk = javaSdk.createJdk(suggestedName, homePath, false);
|
||||
ApplicationManager.getApplication().runWriteAction(() -> addJdk(jdk));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user