From 44b04ea6379e0058706d67870a1c008c301e8100 Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 10 Apr 2019 18:57:55 +0200 Subject: [PATCH] Formatting and organizing imports --- src/de/mas/wiiu/jnus/NUSTitle.java | 3 --- src/de/mas/wiiu/jnus/NUSTitleLoader.java | 2 -- src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java | 1 - .../wiiu/jnus/implementations/NUSDataProviderLocalBackup.java | 2 +- src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java | 1 - src/de/mas/wiiu/jnus/interfaces/NUSDataProvider.java | 1 - src/de/mas/wiiu/jnus/utils/CheckSumWrongException.java | 1 - src/de/mas/wiiu/jnus/utils/download/Downloader.java | 1 - src/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java | 2 +- 9 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/de/mas/wiiu/jnus/NUSTitle.java b/src/de/mas/wiiu/jnus/NUSTitle.java index 224b339..eb2b885 100644 --- a/src/de/mas/wiiu/jnus/NUSTitle.java +++ b/src/de/mas/wiiu/jnus/NUSTitle.java @@ -27,8 +27,6 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.apache.commons.io.FilenameUtils; - import de.mas.wiiu.jnus.entities.TMD; import de.mas.wiiu.jnus.entities.Ticket; import de.mas.wiiu.jnus.entities.content.Content; @@ -39,7 +37,6 @@ import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import de.mas.wiiu.jnus.utils.FSTUtils; import lombok.Getter; import lombok.Setter; -import lombok.val; public class NUSTitle { @Getter @Setter private FST FST; diff --git a/src/de/mas/wiiu/jnus/NUSTitleLoader.java b/src/de/mas/wiiu/jnus/NUSTitleLoader.java index 778bec5..6363848 100644 --- a/src/de/mas/wiiu/jnus/NUSTitleLoader.java +++ b/src/de/mas/wiiu/jnus/NUSTitleLoader.java @@ -19,7 +19,6 @@ package de.mas.wiiu.jnus; import java.io.IOException; import java.io.InputStream; import java.text.ParseException; -import java.util.Arrays; import java.util.Map; import java.util.Optional; import java.util.function.Supplier; @@ -30,7 +29,6 @@ import de.mas.wiiu.jnus.entities.content.Content; import de.mas.wiiu.jnus.entities.fst.FST; import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import de.mas.wiiu.jnus.utils.StreamUtils; -import de.mas.wiiu.jnus.utils.Utils; import de.mas.wiiu.jnus.utils.cryptography.AESDecryption; public class NUSTitleLoader { diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java index 63bf129..a1ababd 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java @@ -24,7 +24,6 @@ import java.io.InputStream; import java.nio.file.Files; import java.util.Optional; -import de.mas.wiiu.jnus.NUSTitle; import de.mas.wiiu.jnus.Settings; import de.mas.wiiu.jnus.entities.content.Content; import de.mas.wiiu.jnus.interfaces.NUSDataProvider; diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocalBackup.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocalBackup.java index 8fc88e1..89941eb 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocalBackup.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocalBackup.java @@ -54,7 +54,7 @@ public class NUSDataProviderLocalBackup implements NUSDataProvider { public Optional getRawTMD() throws IOException { String inputPath = getLocalPath(); String tmdPath = inputPath + File.separator + Settings.TMD_FILENAME; - if (titleVersion != Settings.LATEST_TMD_VERSION) { + if (titleVersion != Settings.LATEST_TMD_VERSION) { tmdPath = inputPath + File.separator + "v" + titleVersion + File.separator + Settings.TMD_FILENAME; } File tmdFile = new File(tmdPath); diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java index 68dc122..e8da27a 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java @@ -23,7 +23,6 @@ import java.util.Optional; import java.util.zip.ZipEntry; import java.util.zip.ZipException; -import de.mas.wiiu.jnus.NUSTitle; import de.mas.wiiu.jnus.Settings; import de.mas.wiiu.jnus.entities.content.Content; import de.mas.wiiu.jnus.implementations.woomy.WoomyInfo; diff --git a/src/de/mas/wiiu/jnus/interfaces/NUSDataProvider.java b/src/de/mas/wiiu/jnus/interfaces/NUSDataProvider.java index 52fe248..f822e4c 100644 --- a/src/de/mas/wiiu/jnus/interfaces/NUSDataProvider.java +++ b/src/de/mas/wiiu/jnus/interfaces/NUSDataProvider.java @@ -15,7 +15,6 @@ * along with this program. If not, see . ****************************************************************************/ - package de.mas.wiiu.jnus.interfaces; import java.io.IOException; diff --git a/src/de/mas/wiiu/jnus/utils/CheckSumWrongException.java b/src/de/mas/wiiu/jnus/utils/CheckSumWrongException.java index 5420899..40546df 100644 --- a/src/de/mas/wiiu/jnus/utils/CheckSumWrongException.java +++ b/src/de/mas/wiiu/jnus/utils/CheckSumWrongException.java @@ -31,6 +31,5 @@ public class CheckSumWrongException extends Exception { super(string); this.givenHash = given; this.expectedHash = expected; - } } diff --git a/src/de/mas/wiiu/jnus/utils/download/Downloader.java b/src/de/mas/wiiu/jnus/utils/download/Downloader.java index ae35e96..abddefb 100644 --- a/src/de/mas/wiiu/jnus/utils/download/Downloader.java +++ b/src/de/mas/wiiu/jnus/utils/download/Downloader.java @@ -42,7 +42,6 @@ public abstract class Downloader { ByteArrayOutputStream byteArray = new ByteArrayOutputStream(); if (responseCode == HttpURLConnection.HTTP_OK) { - InputStream inputStream = httpConn.getInputStream(); int bytesRead = -1; diff --git a/src/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java b/src/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java index a2fd7d4..720b74d 100644 --- a/src/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java +++ b/src/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java @@ -88,7 +88,7 @@ public final class NUSDownloadService extends Downloader { HttpURLConnection connection = (HttpURLConnection) url_obj.openConnection(); connection.setRequestProperty("User-Agent", Settings.USER_AGENT); String sizeString = ""; - if(size.isPresent()) { + if (size.isPresent()) { sizeString = Long.toString(size.get()); } connection.setRequestProperty("Range", "bytes=" + offset + "-" + sizeString);