Java NIO has some problems (like files closing unexpectedly because the thread was interrupted). To avoid those problems, don't use a NIO channel to determine the size of a file, but rather ask the File itself. We have to be prepared to handle wrong/outdated information in this case too, as the inode of the File may change between opening and determining file size. Change-Id: Ic7aa6c3337480879efcce4a3058b548cd0e2cef0 |
12年前 | |
---|---|---|
.. | ||
jgit | Don't use java.nio channel for file size determination | 12年前 |