Skip to content

Commit ea2b0af

Browse files
Vassiliy kudryashov/651 write access exception during new sarif file generation (#674)
* Write access exception during new SARIF file generation #651 * Write access exception during new SARIF file generation #651 Get rid of unused imports
1 parent 093508a commit ea2b0af

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/CodeGenerationController.kt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@ import org.utbot.framework.codegen.model.constructor.tree.TestsGenerationReport
5454
import org.utbot.framework.plugin.api.CodegenLanguage
5555
import org.utbot.framework.plugin.api.ExecutableId
5656
import org.utbot.framework.plugin.api.UtMethodTestSet
57-
import org.utbot.framework.plugin.api.util.UtContext
5857
import org.utbot.framework.plugin.api.util.executableId
5958
import org.utbot.framework.plugin.api.util.id
60-
import org.utbot.framework.plugin.api.util.withUtContext
6159
import org.utbot.framework.util.Conflict
6260
import org.utbot.intellij.plugin.models.GenerateTestsModel
6361
import org.utbot.intellij.plugin.models.packageName
@@ -304,14 +302,14 @@ object CodeGenerationController {
304302

305303
// creating and saving reports
306304
reports += testsCodeWithTestReportFormatted.testsGenerationReport
307-
308-
saveSarifReport(
309-
testClassUpdated,
310-
testSets,
311-
model,
312-
testsCodeWithTestReportFormatted,
313-
)
314-
305+
run(WRITE_ACTION) {
306+
saveSarifReport(
307+
testClassUpdated,
308+
testSets,
309+
model,
310+
testsCodeWithTestReportFormatted,
311+
)
312+
}
315313
unblockDocument(testClassUpdated.project, editor.document)
316314

317315
reportsCountDown.countDown()

0 commit comments

Comments
 (0)