commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IO-362) IOUtils.contentEquals* methods returns false if input1 == input2, should return true
Date Fri, 04 Jan 2013 15:54:13 GMT

     [ https://issues.apache.org/jira/browse/IO-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Gregory updated IO-362:
----------------------------

    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)


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

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

    
> IOUtils.contentEquals* methods returns false if input1 == input2, should return true
> ------------------------------------------------------------------------------------
>
>                 Key: IO-362
>                 URL: https://issues.apache.org/jira/browse/IO-362
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.4
>            Reporter: Matthew Madson
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message