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

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

    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

          People

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

            Dates

              Created:
              Updated:
              Resolved: