diff --git a/compiler/src/dotty/tools/dotc/printing/Texts.scala b/compiler/src/dotty/tools/dotc/printing/Texts.scala index 20d01151a144..e3921a17429c 100644 --- a/compiler/src/dotty/tools/dotc/printing/Texts.scala +++ b/compiler/src/dotty/tools/dotc/printing/Texts.scala @@ -117,7 +117,7 @@ object Texts { case _ => var follow = false for (elem <- relems.reverse) { - if (follow) sb.append("\n") + if (follow) sb.append(System.lineSeparator) elem.print(sb, numberWidth) follow = true } diff --git a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala index 2fb3a275402a..bd21ead291c9 100644 --- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala @@ -3,7 +3,7 @@ package tools package vulpix import java.io.{ File => JFile, InputStreamReader, BufferedReader, PrintStream } -import java.nio.file.Paths; +import java.nio.file.Paths import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.TimeoutException @@ -156,10 +156,9 @@ trait RunnerOrchestration { * scala library. */ private def createProcess: Process = { - val sep = JFile.separator val url = classOf[ChildJVMMain].getProtectionDomain.getCodeSource.getLocation val cp = Paths.get(url.toURI).toString + JFile.pathSeparator + Properties.scalaLibrary - val javaBin = sys.props("java.home") + sep + "bin" + sep + "java" + val javaBin = Paths.get(sys.props("java.home"), "bin", "java").toString new ProcessBuilder(javaBin, "-Dfile.encoding=UTF-8", "-Xmx1g", "-cp", cp, "dotty.tools.vulpix.ChildJVMMain") .redirectErrorStream(true) .redirectInput(ProcessBuilder.Redirect.PIPE)