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

FilePath API in Jenkins should propagate errors

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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)

        Attachments

          Issue Links

            Activity

            Hide
            batmat Baptiste Mathus added a comment -

            OK, then let's consider this fixed until proven otherwise. Like I wrote above anyway, it can be reopened anytime once we know about left things to be still fixed. Thanks for the feedback Devin.

            Show
            batmat Baptiste Mathus added a comment - OK, then let's consider this fixed until proven otherwise. Like I wrote above anyway, it can be reopened anytime once we know about left things to be still fixed. Thanks for the feedback Devin.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Krishan submitted https://github.com/jenkinsci/jenkins/pull/3173, https://github.com/jenkinsci/jenkins/pull/3135 from me was more related to JENKINS-36088. There are likely other things that could be addressed, but I think we got most of the lowest-hanging fruit looking at the related issues and glancing quickly through FilePath.java.

            Show
            dnusbaum Devin Nusbaum added a comment - Krishan submitted https://github.com/jenkinsci/jenkins/pull/3173 , https://github.com/jenkinsci/jenkins/pull/3135 from me was more related to JENKINS-36088 . There are likely other things that could be addressed, but I think we got most of the lowest-hanging fruit looking at the related issues and glancing quickly through FilePath.java .
            Hide
            batmat Baptiste Mathus added a comment - - edited

            Krishan Bhasin would you be BTW be available/willing to handle the possible remainder of this task, if any? We're happy to provide any guidance for this. Thanks!

            Show
            batmat Baptiste Mathus added a comment - - edited Krishan Bhasin would you be BTW be available/willing to handle the possible remainder of this task, if any? We're happy to provide any guidance for this. Thanks!
            Hide
            batmat Baptiste Mathus added a comment -

            I feel like the acceptance criteria are slightly unclear, then it makes it hard to be sure this is done or not. I see at least the PR from Krishan Bhasin and Devin Nusbaum in https://github.com/jenkinsci/jenkins/pull/3135.

             Oleg Nenashev given you filed this, *when you have time* could you possibly add acceptance criteria so it's easily assessable by anyone if/when this would be done?

            Spassiba!

            Show
            batmat Baptiste Mathus added a comment - I feel like the acceptance criteria are slightly unclear, then it makes it hard to be sure this is done or not. I see at least the PR from Krishan Bhasin and Devin Nusbaum  in https://github.com/jenkinsci/jenkins/pull/3135.   Oleg Nenashev given you filed this, * when you have time * could you possibly add acceptance criteria so it's easily assessable by anyone if/when this would be done? Spassiba!
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Daniel Beck IIUC there are still some changes to be done in this ticket

            Show
            oleg_nenashev Oleg Nenashev added a comment - Daniel Beck IIUC there are still some changes to be done in this ticket

              People

              • Assignee:
                krishbhasin Krishan Bhasin
                Reporter:
                oleg_nenashev Oleg Nenashev
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: