sbt / io

IO module for sbt
Apache License 2.0
41 stars 47 forks source link

fix IOSpecification on JDK 13+ #328

Closed xuwei-k closed 2 years ago

xuwei-k commented 2 years ago
Welcome to Scala 2.13.7 (Java HotSpot(TM) 64-Bit Server VM, Java 17).
Type in expressions for evaluation. Or try :help.

scala> java.nio.file.FileSystems.getFileSystem(new java.net.URI("jrt:/")).getPath("java.base").getFileSystem.provider.getScheme
val res0: String = jrt

scala> java.nio.file.FileSystems.getFileSystem(new java.net.URI("jrt:/")).getPath("java.base").toUri
java.io.IOError: java.lang.RuntimeException: /java.base cannot be represented as URI
  at java.base/jdk.internal.jrtfs.JrtPath.toUri(JrtPath.java:175)
  ... 32 elided
Caused by: java.lang.RuntimeException: /java.base cannot be represented as URI
  ... 33 more