Skip to content

Commit

Permalink
chore: use URI.create.toURL instead of new URL that's deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
slandelle committed Sep 11, 2024
1 parent 44c636f commit cff98c9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package io.gatling.sbt.settings.gatling

import java.{ lang => jl }
import java.net.URI

import io.gatling.sbt.GatlingKeys._

Expand Down Expand Up @@ -51,7 +52,7 @@ object EnterpriseSettings {
val taskStart = new TaskEnterpriseStart(config, taskDeploy)

Seq(
config / enterpriseUrl := new URL("https://cloud.gatling.io"),
config / enterpriseUrl := URI.create("https://cloud.gatling.io").toURL,
config / enterprisePackage := taskPackage.buildEnterprisePackage.value,
config / enterpriseUpload := taskUpload.uploadEnterprisePackage.value,
config / enterpriseDeploy := taskDeploy.enterpriseDeploy.evaluated,
Expand All @@ -60,7 +61,7 @@ object EnterpriseSettings {
config / enterpriseSimulationId := sys.props.get("gatling.enterprise.simulationId").getOrElse(""),
config / enterpriseControlPlaneUrl := sys.props
.get("gatling.enterprise.controlPlaneUrl")
.map(configString => new URL(configString)),
.map(configString => URI.create(configString).toURL),
config / waitForRunEnd := jl.Boolean.getBoolean("gatling.enterprise.waitForRunEnd"),
config / enterpriseApiToken := sys.props.get("gatling.enterprise.apiToken").orElse(sys.env.get("GATLING_ENTERPRISE_API_TOKEN")).getOrElse(""),
config / packageBin := (config / enterprisePackage).value // If we directly use config / enterprisePackage for publishing, classifiers (-tests or -it) are not correctly handled.
Expand Down

0 comments on commit cff98c9

Please sign in to comment.