A colleague brought this one to my attention based on the FindBugs report:
EndianUtils.readSwappedLong calls input.read( bytes ) without checking
the return value. So I'm guessing there's a chance that less than 8
bytes might be read.
I'm tempted to solve it by just putting in a for( i=0->8 ) lo
Sounds like a well-found bug.
Could you open a Jira issue with this information? Partly so it
doesn't get lost, but also so that we can have a nice definition of
the issues in the next release.
http://issues.apache.org/jira/browse/IO
Thanks,
Hen
On 5/17/06, Warren Freitag <[EMAIL PROTECTED]>
Hi,
I've been using the EndianUtils class in Commons IO to convert an input
file containing little-endian doubles in binary format. However I've
come across a few situations where the function swapDouble() returns the
wrong value, owing to the fact that the current implementation does the
end
I think the:
public static long readSwappedLong( InputStream input )
throws IOException
{
int value1 = read( input );
int value2 = read( input );
int value3 = read( input );
int value4 = read( input );
int value5 = read( input );
int