Commit bf98a195 authored by Nikita Bobko's avatar Nikita Bobko Committed by intellij-monorepo-bot
Browse files

Fix project memory leak in 'InlineTestGenerated' in Kotlin plugin

See d4faceb41436 for details

(cherry picked from commit 64ef1214a876ccece76e41ebc5df44d9e50731c3)

GitOrigin-RevId: ed471875a18ba8bbf3d524112163927f384d84f2
parent 52bbf926
Showing with 5 additions and 2 deletions
+5 -2
...@@ -120,8 +120,11 @@ public class InlineConstantFieldHandler extends JavaInlineActionHandler { ...@@ -120,8 +120,11 @@ public class InlineConstantFieldHandler extends JavaInlineActionHandler {
} }
InlineFieldDialog dialog = new InlineFieldDialog(project, field, referenceElement); InlineFieldDialog dialog = new InlineFieldDialog(project, field, referenceElement);
if (ApplicationManager.getApplication().isUnitTestMode()) { if (ApplicationManager.getApplication().isUnitTestMode()) {
dialog.doAction(); try {
dialog.close(DialogWrapper.OK_EXIT_CODE, true); dialog.doAction();
} finally {
dialog.close(DialogWrapper.OK_EXIT_CODE, true);
}
} }
else { else {
dialog.show(); dialog.show();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment