Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
Description
RamFileRandomAccessContent
ORIGINAL
@Override
public int read(byte[] b, int off, int len) throws IOException
// getLeftBytes() returns 0 when empty. retLen is 0 when empty and never -1.
FIXED
// HACK Patched to return -1 when empty previously it returned 0
@Override
public int read(final byte[] b, final int off, final int len) throws IOException {
int retLen = InputStreams.END;
final int left = RamFileRandomAccessContent.this.getLeftBytes();
if (left > 0)
return retLen;
}