From 889fac2bdf993dc86f64a8893c0260fdcf848acb Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Mon, 10 Apr 2017 16:40:33 -0400 Subject: Cleanup --- BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java b/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java index fde5111..c675ebf 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java @@ -15,11 +15,11 @@ import java.util.function.Supplier; public class SingleSupplier implements Supplier { private static long nextID = 0; - private Supplier source; + private final Supplier source; private boolean gotten; - private long id; + private final long id; /* * This is bad practice, but I want to know where the single @@ -33,7 +33,7 @@ public class SingleSupplier implements Supplier { * @param supp * The supplier to give a single value from */ - public SingleSupplier(Supplier supp) { + public SingleSupplier(final Supplier supp) { source = supp; gotten = false; @@ -44,10 +44,10 @@ public class SingleSupplier implements Supplier { @Override public T get() { if (gotten == true) { - String msg = String.format( + final String msg = String.format( "Attempted to retrieve value more than once from single supplier #%d", id); - IllegalStateException isex = new IllegalStateException(msg); + final IllegalStateException isex = new IllegalStateException(msg); isex.initCause(instSite); @@ -58,7 +58,7 @@ public class SingleSupplier implements Supplier { try { throw new IllegalStateException("Previous instantiation here."); - } catch (IllegalStateException isex) { + } catch (final IllegalStateException isex) { instSite = isex; } -- cgit v1.2.3