Browse Source

Merge "Use readFully() instead of read()"

stable-0.10
Shawn Pearce 14 years ago committed by Code Review
parent
commit
6bddae5775
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java

2
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java

@ -599,7 +599,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
JGitText.get().packObjectCountMismatch, packCnt, idx.getObjectCount(), getPackFile())); JGitText.get().packObjectCountMismatch, packCnt, idx.getObjectCount(), getPackFile()));
fd.seek(length - 20); fd.seek(length - 20);
fd.read(buf, 0, 20); fd.readFully(buf, 0, 20);
if (!Arrays.equals(buf, packChecksum)) if (!Arrays.equals(buf, packChecksum))
throw new PackMismatchException(MessageFormat.format( throw new PackMismatchException(MessageFormat.format(
JGitText.get().packObjectCountMismatch JGitText.get().packObjectCountMismatch

Loading…
Cancel
Save