Skip to content

Commit e10d0f7

Browse files
committed
fix warning from moving to jdk21
1 parent c185254 commit e10d0f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opamp-client/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import java.io.FileOutputStream
22
import java.io.InputStream
3-
import java.net.URL
3+
import java.net.URI
44

55
plugins {
66
id("otel.java-conventions")
@@ -62,7 +62,7 @@ abstract class DownloadAndExtractOpampProtos @Inject constructor(
6262

6363
@TaskAction
6464
fun execute() {
65-
val url = URL(zipUrl.get())
65+
val url = URI.create(zipUrl.get()).toURL()
6666
downloadedZipFile.get().asFile.parentFile.mkdirs()
6767

6868
url.openStream().use { input: InputStream ->

0 commit comments

Comments
 (0)