-
Task
-
Resolution: Fixed
-
Minor
Starting with Java 20, instantiating URLs via new URL is deprecated in favor of URI#toURL().
While the project's codebase targets Java 11, we can address backwards-compatible deprecations still. The methods to use exist in Java 11 as well.
The following occurrences are of concern: https://github.com/search?q=repo%3Ajenkinsci%2Fjenkins+%22new+URL%22+lang%3Ajava&type=code
More information about the deprecation can be found in the javadocs and constructor deprecation.
- causes
-
JENKINS-72203 install-plugin over jenkins-cli.jar is not working anymore (regression in 2.428)
-
- Closed
-
notmyfault I understand we can use the "uri.toURL()" on java 11. So the requirement is to use "uri.toURL()" over the "new URL()" in all the places you have mentioned in the code is it?