Skip to content

Commit 9ab7743

Browse files
authored
Merge pull request #5561 from thc202/kotlin/warn-java21
kotlin: address warn with Java 21+ in tests
2 parents 34fe421 + bf0162a commit 9ab7743

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

addOns/kotlin/src/test/java/org/zaproxy/addon/kotlin/ClassLoaderTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import static org.junit.jupiter.api.Assertions.assertThrows;
2525
import static org.zaproxy.addon.kotlin.TestUtils.getScriptContents;
2626

27+
import java.net.URI;
2728
import java.net.URL;
2829
import java.net.URLClassLoader;
2930
import java.nio.file.Paths;
@@ -45,7 +46,7 @@ private ClassLoader testFallbackClassLoader() throws Exception {
4546
.getFile())
4647
.getParent()
4748
.toString();
48-
return new URLClassLoader(new URL[] {new URL("file://" + testClasspath + "/")});
49+
return new URLClassLoader(new URL[] {new URI("file://" + testClasspath + "/").toURL()});
4950
}
5051

5152
@Test

0 commit comments

Comments
 (0)