EMCECS / nfs-client-java

Native Java NFS client
Apache License 2.0
70 stars 33 forks source link

Fix a bug when the byte read is -1. Old behavior was thinking … #4

Closed PyMeH closed 7 years ago

PyMeH commented 7 years ago

… that EOF is reached, while in fact the byte read was = -1, now we convert the byte to 0-255 range as per java.io.InputStream#read() contract.

PyMeH commented 7 years ago

@DavidASeibert would you please review and release? Thanks, Rumen

DavidASeibert commented 7 years ago

Never mind the test bit, I added one myself, it didn't take long. Confirmed the problem, then verified that your change fixed it, plus updated copyright dates as needed. It's all on a branch together, for clarity, so I'll commit that shortly and rebuild. Thanks!