Fix SOE after enabling SAM conversions
This commit is contained in:
@@ -25,7 +25,7 @@ import javax.swing.SwingUtilities
|
|||||||
class EdtTestUtil {
|
class EdtTestUtil {
|
||||||
companion object {
|
companion object {
|
||||||
@TestOnly @JvmStatic fun runInEdtAndWait(runnable: Runnable) {
|
@TestOnly @JvmStatic fun runInEdtAndWait(runnable: Runnable) {
|
||||||
runInEdtAndWait { runnable.run() }
|
org.jetbrains.kotlin.test.testFramework.runInEdtAndWait { runnable.run() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ fun runInEdtAndWait(runnable: () -> Unit) {
|
|||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
val application = ApplicationManager.getApplication()
|
val application = ApplicationManager.getApplication()
|
||||||
.takeIf { it !is MockApplication } // because MockApplication do nothing instead of `invokeAndWait`
|
.takeIf { it !is MockApplication } // because MockApplication do nothing instead of `invokeAndWait`
|
||||||
if (application != null)
|
if (application != null)
|
||||||
application.invokeAndWait(runnable)
|
application.invokeAndWait(runnable)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user