amplab/tachyon — pull request #482 by kz-flavius (2014-10-21 20:49:17+00:00)
Title: fix read(byte[] b, int off, int len)  method in FileInStream.java.

Method read(byte[] b, int off, int len) returns 0 when there is nothing left to read. It should return -1.
When "mCurrentPosition" is equal to "FILE_LENGTH" the while loop is skipped and "tLen" has the same value as "len", and this means that the return value will be always 0 when there is nothing left to read. This will cause an infinite loop.
The issue exists in all branches. I've made the fix and pull request here because I'm working with the release version for 5.0, but all the branches should get the fix.