parallelgzip icon indicating copy to clipboard operation
parallelgzip copied to clipboard

Minor Simplifications

Open simlu opened this issue 8 years ago • 0 comments

https://github.com/shevek/parallelgzip/blob/de135ec772d763be7d31f13af132bc8cb944140f/src/main/java/org/anarres/parallelgzip/ParallelGZIPOutputStream.java#L234-L239

How about

        block = freeBlock == null ? new Block() : freeBlock;
        freeBlock = null;

Shorter and more understandable.

Also the first throw exception is unnecessary.

Created a PR here: https://github.com/shevek/parallelgzip/pull/10

simlu avatar Sep 30 '17 23:09 simlu