Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-814

FileUtils.deleteDirectory can throw UncheckedIOException

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.13.0, 2.14.0
    • 2.15.0
    • None
    • None

    Description

      This was a behavior breaking change, and an incorrect one to boot.

      Operations that can have I/O errors should throw IOException if they can't directly handle the I/O error. UncheckedIOException is not a reasonable alternative.

      A method that can neither handle nor throw IOException must not perform I/O operations.

      It's worth noting that functional programming, not just in Java but in general, does not allow I/O. As soon as a method performs I/O, it's no longer a pure function and should not be written in a functional style.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            elharo Elliotte Rusty Harold
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment