浏览代码

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

tags/v2.0.0.201206130900-r
Robin Rosenberg 12 年前
父节点
当前提交
48bd58b8ee
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 1
    7
      org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java

+ 1
- 7
org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java 查看文件

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

if (actSz == sz) {
byte[] ret = new byte[actSz];
System.arraycopy(buf, 0, ret, 0, actSz);
return ret;
}
IO.readFully(in, buf, 0);
return buf;
} finally {
try {

正在加载...
取消
保存