Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47324

FilePath API in Jenkins should propagate errors

      Almost all methods in https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/FilePath.java use obsolete pre-Java7 API, which does not propagate errors.

      • The code should be updated to java.nio.Files: https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html
      • Methods should propagate errors via IOExceptions where possible (and log errors to java.util.logging.Logger otherwise)
      • Runtime exceptions from the new API should be caught if the methods throw them (e.g. InvalidPathException)

          [JENKINS-47324] FilePath API in Jenkins should propagate errors

          Oleg Nenashev created issue -
          Oleg Nenashev made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: core [ 15738 ]
          Key Original: SECURITY-625 New: JENKINS-47324
          Workflow Original: Security v1.2 [ 223061 ] New: JNJira + In-Review [ 223062 ]
          Project Original: Security Issues [ 10180 ] New: Jenkins [ 10172 ]
          Status Original: Untriaged [ 10001 ] New: Open [ 1 ]
          Oleg Nenashev made changes -
          Labels Original: diagnostics New: diagnostics newbie-friendly
          Oleg Nenashev made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]
          James Nord made changes -
          Link New: This issue relates to JENKINS-34855 [ JENKINS-34855 ]
          James Nord made changes -
          Link New: This issue relates to JENKINS-36088 [ JENKINS-36088 ]
          Mariia Komar made changes -
          Assignee New: Mariia Komar [ marykomar ]

          Is this issue taken? I'd like to have a crack at it if not

          Krishan Bhasin added a comment - Is this issue taken? I'd like to have a crack at it if not

          Oleg Nenashev added a comment -

          krishbhasin yes. marykomar has taken the issue, but so far there is no progress on it AFAICT. There may be other issues around of such kind. Actually you can look for any obsolete Java 6 File API usage (File#mkdirs() & Co) in the core and create patches for that

          Oleg Nenashev added a comment - krishbhasin yes. marykomar has taken the issue, but so far there is no progress on it AFAICT. There may be other issues around of such kind. Actually you can look for any obsolete Java 6 File API usage (File#mkdirs() & Co) in the core and create patches for that

          Mariia Komar added a comment -

          Yes, I'm working on it.

          Mariia Komar added a comment - Yes, I'm working on it.

            krishbhasin Krishan Bhasin
            oleg_nenashev Oleg Nenashev
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: