Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Wrap file reading with try/catch
  • Loading branch information
EgorkaKulikov committed Oct 5, 2022
commit e358e0ae986300b0b9896388c67a44c9b984755f
Original file line number Diff line number Diff line change
Expand Up @@ -1033,8 +1033,13 @@ class GenerateTestsDialogWindow(val model: GenerateTestsModel) : DialogWrapper(m
val mockMakerPath = "$entryPath/$MOCKITO_EXTENSIONS_FOLDER/$MOCKITO_MOCKMAKER_FILE_NAME".toPath()
if (!Files.exists(mockMakerPath)) return false

val fileLines = Files.readAllLines(mockMakerPath)
fileLines.singleOrNull() == MOCKITO_EXTENSIONS_FILE_CONTENT
try {
val fileLines = Files.readAllLines(mockMakerPath)
fileLines.singleOrNull() == MOCKITO_EXTENSIONS_FILE_CONTENT
} catch (e: java.io.IOException) {
return false
}

}
}
}
Expand Down