Skip to content

Commit 0e30133

Browse files
authored
Merge pull request scala#10390 from som-snytt/tweak/uri-syntax
2 parents eeb52dc + bb50eed commit 0e30133

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/compiler/scala/tools/nsc/util/ClassPath.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ package scala.tools.nsc
1414
package util
1515

1616
import io.{AbstractFile, Directory, File, Jar}
17-
import java.net.MalformedURLException
18-
import java.net.{URI, URL}
17+
import java.net.{MalformedURLException, URI, URISyntaxException, URL}
1918
import java.util.regex.PatternSyntaxException
2019

2120
import File.pathSeparator
@@ -185,7 +184,7 @@ object ClassPath {
185184

186185
def specToURL(spec: String): Option[URL] =
187186
try Some(new URI(spec).toURL)
188-
catch { case _: MalformedURLException => None }
187+
catch { case _: MalformedURLException | _: URISyntaxException => None }
189188

190189
def manifests: List[java.net.URL] = {
191190
import scala.jdk.CollectionConverters._

0 commit comments

Comments
 (0)