From 889fac2bdf993dc86f64a8893c0260fdcf848acb Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Mon, 10 Apr 2017 16:40:33 -0400 Subject: Cleanup --- .../bjc/utils/ioutils/blocks/SerialBlockReader.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/SerialBlockReader.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/SerialBlockReader.java b/BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/SerialBlockReader.java index 2363468..7735981 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/SerialBlockReader.java +++ b/BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/SerialBlockReader.java @@ -5,7 +5,7 @@ import java.util.Deque; /** * Provides a means of concatenating two block readers. - * + * * @author bjculkin * */ @@ -16,13 +16,13 @@ public class SerialBlockReader implements BlockReader { /** * Create a new serial block reader. - * + * * @param readers * The readers to pull from, in the order to pull from * them. */ - public SerialBlockReader(BlockReader... readers) { - for (BlockReader reader : readers) { + public SerialBlockReader(final BlockReader... readers) { + for (final BlockReader reader : readers) { readerQueue.add(reader); } } @@ -38,7 +38,7 @@ public class SerialBlockReader implements BlockReader { while (!cont) { try { readerQueue.pop().close(); - } catch (IOException ioex) { + } catch (final IOException ioex) { throw new IllegalStateException("Exception thrown by discarded reader", ioex); } @@ -68,7 +68,7 @@ public class SerialBlockReader implements BlockReader { while (!cont) { try { readerQueue.pop().close(); - } catch (IOException ioex) { + } catch (final IOException ioex) { throw new IllegalStateException("Exception thrown by discarded reader", ioex); } @@ -77,7 +77,9 @@ public class SerialBlockReader implements BlockReader { cont = gotBlock || readerQueue.isEmpty(); } - if (cont) blockNo += 1; + if (cont) { + blockNo += 1; + } return cont; } @@ -90,7 +92,7 @@ public class SerialBlockReader implements BlockReader { @Override public void close() throws IOException { while (!readerQueue.isEmpty()) { - BlockReader reader = readerQueue.pop(); + final BlockReader reader = readerQueue.pop(); reader.close(); } -- cgit v1.2.3