diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java index e2326c4a8fd..aa519d9f355 100644 --- a/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java +++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java @@ -160,12 +160,11 @@ boolean blockSort(final BZip2CompressorOutputStream.Data data, final int last) { if (last + 1 < 10000) { fallbackSort(data, last); } else { + mainSort(data, last); - mainSort(data, last); - - if (this.firstAttempt && (this.workDone > this.workLimit)) { + if (this.firstAttempt && (this.workDone > this.workLimit)) { fallbackSort(data, last); - } + } } final int[] fmap = data.fmap;