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.

          [JENKINS-72028] Address deprecated URL instantiation

          Achintha added a comment - - edited

          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?

           

          Achintha added a comment - - edited 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?  

          I'm working on it.

          Abhishek Maity added a comment - I'm working on it.

          Completed

          Abhishek Maity added a comment - Completed

          Basil Crow added a comment -

          Causes JENKINS-72203.

          Basil Crow added a comment - Causes JENKINS-72203 .

          Basil Crow added a comment -

          Basil Crow added a comment - Reverted in https://github.com/jenkinsci/jenkins/pull/8637

            abhishekmaity Abhishek Maity
            notmyfault Alexander Brandes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: