diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-02-13 20:52:37 -0400 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-02-13 20:52:37 -0400 |
| commit | 2d8f0aba5565b292f17695afd276143a4f71c72b (patch) | |
| tree | 2e855252038af0b15275958b64caaee9e72f8847 /base/src/main/java/bjc/utils/ioutils/blocks | |
| parent | cb45a62d8629e079ae403489efab392d7208cb62 (diff) | |
Update
Diffstat (limited to 'base/src/main/java/bjc/utils/ioutils/blocks')
| -rw-r--r-- | base/src/main/java/bjc/utils/ioutils/blocks/SimpleBlockReader.java | 5 | ||||
| -rw-r--r-- | base/src/main/java/bjc/utils/ioutils/blocks/ToggledBlockReader.java | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/base/src/main/java/bjc/utils/ioutils/blocks/SimpleBlockReader.java b/base/src/main/java/bjc/utils/ioutils/blocks/SimpleBlockReader.java index 6536d0c..4b7f76b 100644 --- a/base/src/main/java/bjc/utils/ioutils/blocks/SimpleBlockReader.java +++ b/base/src/main/java/bjc/utils/ioutils/blocks/SimpleBlockReader.java @@ -9,7 +9,7 @@ import java.util.regex.Pattern; import bjc.utils.funcutils.StringUtils; /** - * Simple implementation of {@link BlockReader} + * Simple implementation of {@link BlockReader}. * * NOTE: The EOF marker is always treated as a delimiter. You are expected to * handle blocks that may be shorter than you expect. @@ -71,8 +71,9 @@ public class SimpleBlockReader implements BlockReader { /* * Read in a new block, and keep the line numbers sane. */ - final int blockStartLine = lineNo; final String blockContents = blockReader.next(); + + final int blockStartLine = lineNo; final int blockEndLine = lineNo + StringUtils.countMatches(blockContents, "\\R"); lineNo = blockEndLine; diff --git a/base/src/main/java/bjc/utils/ioutils/blocks/ToggledBlockReader.java b/base/src/main/java/bjc/utils/ioutils/blocks/ToggledBlockReader.java index 0b756c5..91952fc 100644 --- a/base/src/main/java/bjc/utils/ioutils/blocks/ToggledBlockReader.java +++ b/base/src/main/java/bjc/utils/ioutils/blocks/ToggledBlockReader.java @@ -14,9 +14,7 @@ public class ToggledBlockReader implements BlockReader { private BlockReader leftSource; private BlockReader rightSource; - /* - * We choose the left source when this is true. - */ + /* We choose the left source when this is true. */ private BooleanToggle leftToggle; private int blockNo; |
