From ad9033e43a6c4d37863300e9291ed1c0847767dc Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sun, 12 Feb 2012 20:40:15 +0100 Subject: [PATCH] Revert non-sense logic in IO.readFully This was introduced in alleged support for autocrlf, but the logic makes no sense here. Change-Id: If37f3b90f21f875cee7165e17a17adfda446384d --- org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java index cafc94057..779bdfcf5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java @@ -142,13 +142,7 @@ public static final byte[] readFully(final File path, final int max) 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 {