Only update hash when there is more data
@@ -30,7 +30,9 @@ public class LazyFileReferenceData extends FileReferenceData {
} catch (IOException e) {
return -1;
}
+ if (read > 0) {
hasher.update(bb.array(), pos, read);
+ }
return read;
}
