commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject [compress] JDK 9 b64 breaks bzip2 decompression
Date Wed, 27 May 2015 20:05:29 GMT
Hi all

just as a heads up: while test-driving Ant on the latest JDK9 build I
ran into errors for the tests that uncompressed bzip2 files, so I gave
Commons Compress a try as well (Ant's bzip2 code base is pretty close to
the CC one).

In order to build Compress with JDK9 you need to set source and target
to 1.6 and disable Animal Sniffer (don't ask me why, it fails), i.e.:

$ mvn clean test -Dmaven.compiler.source=1.6 \
  -Dmaven.compiler.target=1.6 -Danimal.sniffer.skip=true

We get two unit test failures, the one that looks very similar to the
one I see in Ant is

FAILURE! - in
org.apache.commons.compress.compressors.DetectCompressorTestCase
testMutiples(org.apache.commons.compress.compressors.DetectCompressorTestCase)
Time elapsed: 0.002 sec  <<< ERROR!
java.lang.ArrayIndexOutOfBoundsException: 1
  at org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.setupBlock(BZip2CompressorInputStream.java:813)
  at org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.setupNoRandPartA(BZip2CompressorInputStream.java:872)
  at org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.setupNoRandPartB(BZip2CompressorInputStream.java:920)
  at org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.read0(BZip2CompressorInputStream.java:220)
  at org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.read(BZip2CompressorInputStream.java:139)
  at org.apache.commons.compress.compressors.DetectCompressorTestCase.testMutiples(DetectCompressorTestCase.java:156)

The test passes for everything I've thrown at it starting with a JDK6
I've still got around.

I won't find time to dig into the issue any deeper soon, but maybe
anybody else can.  For the JDK team I think the Commons Compress test
case is easier to reproduce than running the Ant test suite.  For
anybody looking at the code for the first time, yes, this looks like C
:-)

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