Skip to content

Commit

Permalink
new URL(...) is deprecated from JDK 20 onwards.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturaz authored and sherpal committed Jul 3, 2024
1 parent 57e7103 commit 47a528c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package urldsl.url

import java.net.{URL, URLDecoder}
import java.net.{URI, URLDecoder}

final class JavaNetUrlStringParser(val rawUrl: String) extends UrlStringParser {

private val urlParser = new URL(rawUrl)
private val urlParser = URI.create(rawUrl).toURL()

def queryParametersString: String = Option(urlParser.getQuery).getOrElse("")

Expand Down

0 comments on commit 47a528c

Please sign in to comment.