commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [compress] JDK 9 b64 breaks bzip2 decompression
Date Fri, 29 May 2015 19:00:59 GMT
I've stripped down the test case to

-------------------------------------

import java.io.*;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.utils.IOUtils;

public class Bzip2DecompressorLoop {
    public static void main(String[] args) throws IOException {
        int loops = 0;
        while (true) {
            ByteArrayOutputStream devNull = new ByteArrayOutputStream();
            BZip2CompressorInputStream in = new BZip2CompressorInputStream(new FileInputStream("bla.tar.bz2"));
            IOUtils.copy(in, devNull);
            System.err.println("Finished loop: " + (loops++));
        }
    }
}
                
-------------------------------------

compile it against Commons Compress 1.9 and use
https://svn.apache.org/repos/asf/commons/proper/compress/trunk/src/test/resources/bla.txt.bz2

It's not always the same number but somewhere around "loop 53" I get a
"BZip2 CRC error" when using JDK 9 b64 - this is after decompressing the
same file several times without any problems.

Cheers

        Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message