no need to special-case EOF state
@@ -60,10 +60,9 @@ public BlockLZ4CompressorInputStream(final InputStream is) throws IOException {
*/
@Override
public int read(final byte[] b, final int off, final int len) throws IOException {
- if (state == State.EOF) {
- return -1;
- }
switch (state) {
+ case EOF:
+ return -1;
case NO_BLOCK:
readSizes();
/*FALLTHROUGH*/
