From 0cb40d4c5795569001561713af96eca7917cce8d Mon Sep 17 00:00:00 2001 From: demasterr Date: Sat, 9 Mar 2019 15:10:24 +0100 Subject: [PATCH] Move down declaration and code convention --- android/src/com/mapswithme/util/log/ZipLogsTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/src/com/mapswithme/util/log/ZipLogsTask.java b/android/src/com/mapswithme/util/log/ZipLogsTask.java index b880d8d289..58c1759d7d 100644 --- a/android/src/com/mapswithme/util/log/ZipLogsTask.java +++ b/android/src/com/mapswithme/util/log/ZipLogsTask.java @@ -64,11 +64,12 @@ class ZipLogsTask implements Runnable } else { - byte data[] = new byte[BUFFER_SIZE]; try(FileInputStream fi = new FileInputStream(sourcePath); - BufferedInputStream origin = new BufferedInputStream(fi, BUFFER_SIZE);) { + BufferedInputStream origin = new BufferedInputStream(fi, BUFFER_SIZE);) + { ZipEntry entry = new ZipEntry(getLastPathComponent(sourcePath)); out.putNextEntry(entry); + byte data[] = new byte[BUFFER_SIZE]; int count; while ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) { out.write(data, 0, count);