ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 48313] New: HashvalueAlgorithm assumes available() returns length of file
Date Tue, 01 Dec 2009 05:51:50 GMT

           Summary: HashvalueAlgorithm assumes available() returns length
                    of file
           Product: Ant
           Version: 1.7.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core

Created an attachment (id=24646)
 --> (
Modifies to read the entire file

The current implementation of HashvalueAlgorithm uses the
InputStream.available() to determine the number of bytes in the File. The
method available() isn't guaranteed to return the number bytes in the stream,
rather it returns the number of bytes that can be read before blocking.

To correctly read the entire File contents, a looping read must be employed.
I've modified the code to maintain the functionality, but perform a guaranteed
full read of the File.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message