fix deprecated constructor

This commit is contained in:
friendseeker 2024-12-19 19:23:50 -08:00
parent c95ebaaf7e
commit c1ffcb26aa
No known key found for this signature in database
GPG Key ID: 7DD5039728A27160
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
package lmcoursier
import java.io.File
import java.net.{ URL, URLClassLoader }
import java.net.{ URI, URLClassLoader }
import coursier.{ Organization, Resolution }
import coursier.core.{ Classifier, Configuration }
@ -55,7 +55,7 @@ class CoursierDependencyResolution(
val conf0 = protocolHandlerConfiguration.getOrElse(conf)
def isUnknownProtocol(rawURL: String): Boolean = {
Try(new URL(rawURL)) match {
Try(new URI(rawURL).toURL) match {
case Failure(ex) if ex.getMessage.startsWith("unknown protocol: ") => true
case _ => false
}