From 01ee6b9ad844db04902db4d2ae25af588fffba06 Mon Sep 17 00:00:00 2001 From: Ben Culkin <15405@DESKTOP-JT5100E> Date: Mon, 23 Mar 2020 17:56:34 -0400 Subject: General cleanup Just doing some general cleanup around the code base --- src/main/java/tlIItools/AffixLister.java | 8 -------- src/main/java/tlIItools/NameFileReader.java | 6 ++---- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/main/java/tlIItools/AffixLister.java b/src/main/java/tlIItools/AffixLister.java index 76e93996..b241caf5 100644 --- a/src/main/java/tlIItools/AffixLister.java +++ b/src/main/java/tlIItools/AffixLister.java @@ -5,13 +5,10 @@ import java.io.FileReader; import java.io.PrintStream; import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Scanner; -import java.util.Set; /** * Lists randomly generated affixes for Torchlight II gear. @@ -80,7 +77,6 @@ public class AffixLister { boolean omitZeros = false; boolean listZeros = false; - boolean guessGroups = false; NameMode nameMode = NameMode.ALL; @@ -93,8 +89,6 @@ public class AffixLister { List nonGroupContents = afst.ungroupedAffixes; - int argCount = 0; - NameFileReader nfr = new NameFileReader(false); nfr.groupRx = ".*/mods/([^/]+)/*"; @@ -231,8 +225,6 @@ public class AffixLister { } if (isArg) { - argCount += 1; - continue; } diff --git a/src/main/java/tlIItools/NameFileReader.java b/src/main/java/tlIItools/NameFileReader.java index ad2a83b4..c63ac417 100644 --- a/src/main/java/tlIItools/NameFileReader.java +++ b/src/main/java/tlIItools/NameFileReader.java @@ -111,8 +111,6 @@ public class NameFileReader { * @return The number of files read. */ public void readFrom(String from) { - int ret; - try (FileReader fr = new FileReader(from)) { readFrom(fr); } catch (IOException ioex) { @@ -131,8 +129,6 @@ public class NameFileReader { * @return The number of files read. */ public void readFrom(Reader r) { - int numFiles = 0; - Scanner scn = new Scanner(r); while (scn.hasNextLine()) { @@ -156,6 +152,8 @@ public class NameFileReader { skipAdd = false; } + + scn.close(); } /** -- cgit v1.2.3