Add release automation workflow by xerial · Pull Request #384 · xerial/snappy-java (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xerial I'm very sorry, but I still need to bother you
I wrote a simple demo to reproduce this issue, the demo is in https://github.com/LuciferYang/snappy-java-test

@Test public void testCompress() throws IOException { ByteBuffer src = ByteBuffer.allocateDirect(1024); src.put("hello world".getBytes()); src.flip(); ByteBuffer dest = ByteBuffer.allocateDirect(1024); int maxCompressedLen = Snappy.compress(src, dest); Assert.assertEquals(maxCompressedLen, 13); }

run the above case with zulu 8u352

java -version
openjdk version "1.8.0_352"
OpenJDK Runtime Environment (Zulu 8.66.0.15-CA-macos-aarch64) (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM (Zulu 8.66.0.15-CA-macos-aarch64) (build 25.352-b08, mixed mode)

with snappy-java 1.1.8.4 the test passed

mvn clean test -Dsnappy-java.version=1.1.8.4

with snappy-java 1.1.9.0

mvn clean test -Dsnappy-java.version=1.1.9.0

the test failed as follows:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.example.SnappyJavaTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.374 sec <<< FAILURE!
testCompress(org.example.SnappyJavaTest)  Time elapsed: 0.345 sec  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
    at org.xerial.snappy.Snappy.compress(Snappy.java:157)
    at org.example.SnappyJavaTest.testCompress(SnappyJavaTest.java:17)