Skip to content

Commit

Permalink
Replace deprecated URL constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneshauer authored and gaeljw committed Mar 1, 2024
1 parent 8762b91 commit a033079
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import pact4s.provider.PactSource.{FileSource, PactBroker, PactBrokerWithSelecto
import pact4s.provider.StateManagement.StateManagementFunction
import pact4s.provider.VerificationSettings.AnnotatedMethodVerificationSettings

import java.net.{URI, URL}
import java.net.URI
import java.net.URL
import java.time.format.DateTimeFormatter
import java.time.{Instant, ZoneOffset}
import java.util.function.Consumer
Expand Down Expand Up @@ -167,7 +168,7 @@ final class ProviderInfoBuilder private (
p.setVerificationType(PactVerification.ANNOTATED_METHOD)
p.setPackagesToScan(packagesToScan.asJava)
}
stateManagement.foreach(s => p.setStateChangeUrl(new URL(s.url)))
stateManagement.foreach(s => p.setStateChangeUrl(new URI(s.url).toURL))
p.setRequestFilter {
// because java
new Consumer[HttpRequest] {
Expand Down

0 comments on commit a033079

Please sign in to comment.