-
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
-
[JENKINS-72028] Address deprecated URL instantiation
Assignee | New: Abhishek Maity [ abhishekmaity ] |
Attachment | New: Screenshot 2023-09-20 005844.png [ 61161 ] |
Attachment | Original: Screenshot 2023-09-20 005844.png [ 61161 ] |
Attachment | New: Screenshot 2023-09-20 005844.png [ 61162 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Fixed but Unreleased [ 10203 ] |
Resolution | Original: Fixed [ 1 ] | |
Status | Original: Fixed but Unreleased [ 10203 ] | New: Reopened [ 4 ] |
Status | Original: Reopened [ 4 ] | New: Open [ 1 ] |
Comment |
[ Hi, I have accepted this task and wish to PR {-}for upcoming hacktoberfest{-}. I am new and seek guidance/help in completing this task. I am facing issue at [core/src/main/java/hudson/Main.java|https://github.com/jenkinsci/jenkins/blob/c5fbbbe88dc280d0a0876614c0f9aa6fba2ea2af/core/src/main/java/hudson/Main.java#L119] → {color:#ff0000}'URI(java.lang.String, java.lang.String)' is not public in 'java.net.URI'. Cannot be accessed from outside package{color} How to fix and proceed?
!Screenshot 2023-09-20 005844.png|thumbnail! [~notmyfault], do I need to update only at the places you have mentioned in the code snippet ? ] |