From f134f45f4155efbba6ab808a85528929961f5cb3 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Thu, 24 Jan 2013 17:12:38 +0100 Subject: [PATCH] Updater: pessimization reverted --- updater/src/com/intellij/updater/Utils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/updater/src/com/intellij/updater/Utils.java b/updater/src/com/intellij/updater/Utils.java index ebfdc57fe289..427788eaf1ac 100644 --- a/updater/src/com/intellij/updater/Utils.java +++ b/updater/src/com/intellij/updater/Utils.java @@ -6,6 +6,8 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipFile; public class Utils { + // keep buffer static as there may be many calls of the copyStream method. + private static final byte[] BUFFER = new byte[64 * 1024]; private static File myTempDir; public static boolean isZipFile(String fileName) { @@ -129,7 +131,6 @@ public class Utils { } public static void copyStream(InputStream in, OutputStream out) throws IOException { - final byte[] BUFFER = new byte[1024 * 1024]; while (true) { int read = in.read(BUFFER); if (read < 0) break;