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

IOUtils.contentEquals* methods returns false if input1 == input2, should return true

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.5
    • Utilities
    • None

    Description

      The fix should be relatively simple, just add an identity check to the beginning of the method:

      if(is1 == is2) {
      return true;
      }

      The methods affected are:

      • org.apache.commons.io.IOUtils.contentEquals(InputStream, InputStream)
      • org.apache.commons.io.IOUtils.contentEquals(Reader, Reader)
      • org.apache.commons.io.IOUtils.contentEqualsIgnoreEOL(Reader, Reader)

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            mmadson Matthew Madson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment