Convert to Java 11 compressor

This commit is contained in:
Andrew Steinborn
2021-05-23 13:58:01 -04:00
parent 59f358441a
commit 590f18dbe0
6 changed files with 41 additions and 258 deletions

View File

@@ -79,22 +79,6 @@ class VelocityCompressorTest {
check(compressor, () -> Unpooled.buffer(TEST_DATA.length + 32));
}
@Test
@EnabledOnJre(JRE.JAVA_11)
void java11IntegrityCheckDirect() throws DataFormatException {
VelocityCompressor compressor = Java11VelocityCompressor.FACTORY
.create(Deflater.DEFAULT_COMPRESSION);
check(compressor, () -> Unpooled.directBuffer(TEST_DATA.length + 32));
}
@Test
@EnabledOnJre(JRE.JAVA_11)
void java11IntegrityCheckHeap() throws DataFormatException {
VelocityCompressor compressor = Java11VelocityCompressor.FACTORY
.create(Deflater.DEFAULT_COMPRESSION);
check(compressor, () -> Unpooled.buffer(TEST_DATA.length + 32));
}
private void check(VelocityCompressor compressor, Supplier<ByteBuf> bufSupplier)
throws DataFormatException {
ByteBuf source = bufSupplier.get();