Skip to content

Commit

Permalink
Merge pull request #10390 from som-snytt/tweak/uri-syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed May 3, 2023
2 parents eeb52dc + bb50eed commit 0e30133
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/compiler/scala/tools/nsc/util/ClassPath.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ package scala.tools.nsc
package util

import io.{AbstractFile, Directory, File, Jar}
import java.net.MalformedURLException
import java.net.{URI, URL}
import java.net.{MalformedURLException, URI, URISyntaxException, URL}
import java.util.regex.PatternSyntaxException

import File.pathSeparator
Expand Down Expand Up @@ -185,7 +184,7 @@ object ClassPath {

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

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

0 comments on commit 0e30133

Please sign in to comment.