Use withIgnoredConflicts to fix compilation in 191

This commit is contained in:
Nikolay Krasko
2018-10-18 02:44:40 +03:00
parent e3d7edb6ce
commit 2c98153c6c
@@ -130,14 +130,12 @@ fun runRefactoringTest(
catch(e: BaseRefactoringProcessor.ConflictsInTestsException) {
KotlinTestUtils.assertEqualsToFile(conflictFile, e.messages.distinct().sorted().joinToString("\n"))
BaseRefactoringProcessor.ConflictsInTestsException.setTestIgnore(true)
// Run refactoring again with ConflictsInTestsException suppressed
action.runRefactoring(rootDir, mainPsiFile, elementsAtCaret, config)
BaseRefactoringProcessor.ConflictsInTestsException.withIgnoredConflicts<Throwable> {
// Run refactoring again with ConflictsInTestsException suppressed
action.runRefactoring(rootDir, mainPsiFile, elementsAtCaret, config)
}
}
finally {
BaseRefactoringProcessor.ConflictsInTestsException.setTestIgnore(false)
EditorFactory.getInstance()!!.releaseEditor(editor)
}
}