From d0ca212d97b64b1db3a0416819228e5eb7c41479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BF=97=E8=B1=AA?= Date: Tue, 12 Nov 2019 19:22:21 +0800 Subject: [PATCH] Fix "cannot be represented as URI" in JDK 13 Taken from https://github.com/scala/scala/pull/8210 --- .../src/dotty/tools/dotc/classpath/DirectoryClassPath.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala b/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala index f3c5d48ddaa6..dc5504cffba0 100644 --- a/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala +++ b/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala @@ -179,7 +179,7 @@ final class JrtClassPath(fs: java.nio.file.FileSystem) extends ClassPath with No if (inPackage == "") ClassPathEntries(packages(inPackage), Nil) else ClassPathEntries(packages(inPackage), classes(inPackage)) - def asURLs: Seq[URL] = Seq(dir.toUri.toURL) + def asURLs: Seq[URL] = Seq(new URL("jrt:/")) // We don't yet have a scheme to represent the JDK modules in our `-classpath`. // java models them as entries in the new "module path", we'll probably need to follow this. def asClassPathStrings: Seq[String] = Nil