Skip to content

Commit

Permalink
Fix crash on Java <11 at end of mutation run (#935)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-vrijswijk authored Aug 12, 2021
1 parent d093381 commit fac1032
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ trait MutantRunResultMapper {
}

private def fileContentAsString(path: Path)(implicit config: Config): String =
Files.readString((config.baseDir / path.toString).toNioPath)
new String(Files.readAllBytes((config.baseDir / path).toNioPath))
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class MutantRunResultMapperTest extends Stryker4sSuite with Inside {
)
)
)
source should equal(Files.readString(FileUtil.getResource("scalaFiles/ExampleClass.scala").toNioPath))
source should equal(
new String(Files.readAllBytes(FileUtil.getResource("scalaFiles/ExampleClass.scala").toNioPath))
)
m.config.value shouldBe config
}
}
Expand Down

0 comments on commit fac1032

Please sign in to comment.