https://issues.apache.org/bugzilla/show_bug.cgi?id=48313
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
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=24646)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24646)
Modifies HashvalueAlgorithm.java 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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.