Browse Source

Merge "Revert non-sense logic in IO.readFully"

stable-2.0
Robin Rosenberg 13 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
48bd58b8ee
  1. 8
      org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java

8
org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java

@ -142,13 +142,7 @@ public class IO {
throw new IOException(MessageFormat.format( throw new IOException(MessageFormat.format(
JGitText.get().fileIsTooLarge, path)); JGitText.get().fileIsTooLarge, path));
final byte[] buf = new byte[(int) sz]; final byte[] buf = new byte[(int) sz];
int actSz = IO.readFully(in, buf, 0); IO.readFully(in, buf, 0);
if (actSz == sz) {
byte[] ret = new byte[actSz];
System.arraycopy(buf, 0, ret, 0, actSz);
return ret;
}
return buf; return buf;
} finally { } finally {
try { try {

Loading…
Cancel
Save