From ed7df108e5c974d36fc32b43397f560a0a44b72c Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Wed, 27 Jun 2018 01:02:23 -0400 Subject: [PATCH] Minor code style clean up --- .../java/com/rarchives/ripme/ripper/DownloadFileThread.java | 3 ++- .../java/com/rarchives/ripme/ripper/DownloadVideoThread.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/DownloadFileThread.java b/src/main/java/com/rarchives/ripme/ripper/DownloadFileThread.java index 45c72c6e..d4439a74 100644 --- a/src/main/java/com/rarchives/ripme/ripper/DownloadFileThread.java +++ b/src/main/java/com/rarchives/ripme/ripper/DownloadFileThread.java @@ -184,7 +184,8 @@ class DownloadFileThread extends Thread { } else { fos = new FileOutputStream(saveAs); } - byte[] data = new byte[1024 * 256]; int bytesRead; + byte[] data = new byte[1024 * 256]; + int bytesRead; while ( (bytesRead = bis.read(data)) != -1) { try { observer.stopCheck(); diff --git a/src/main/java/com/rarchives/ripme/ripper/DownloadVideoThread.java b/src/main/java/com/rarchives/ripme/ripper/DownloadVideoThread.java index 437f18d0..ef55e54e 100644 --- a/src/main/java/com/rarchives/ripme/ripper/DownloadVideoThread.java +++ b/src/main/java/com/rarchives/ripme/ripper/DownloadVideoThread.java @@ -76,7 +76,8 @@ class DownloadVideoThread extends Thread { int tries = 0; // Number of attempts to download do { InputStream bis = null; OutputStream fos = null; - byte[] data = new byte[1024 * 256]; int bytesRead; + byte[] data = new byte[1024 * 256]; + int bytesRead; try { logger.info(" Downloading file: " + url + (tries > 0 ? " Retry #" + tries : "")); observer.sendUpdate(STATUS.DOWNLOAD_STARTED, url.toExternalForm());