diff --git a/flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/compression/BlockCompressionTest.java b/flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/compression/BlockCompressionTest.java index ebcfec7272706..bfc888cc85805 100644 --- a/flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/compression/BlockCompressionTest.java +++ b/flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/compression/BlockCompressionTest.java @@ -20,8 +20,6 @@ import org.junit.Assert; import org.junit.Test; -import sun.misc.Cleaner; -import sun.nio.ch.DirectBuffer; import java.nio.ByteBuffer; @@ -174,19 +172,5 @@ private void runByteBufferTest( for (int i = 0; i < decompressedLen; i++) { assertEquals((byte) i, decompressedData.get()); } - - if (isDirect) { - cleanDirectBuffer(data); - cleanDirectBuffer(compressedData); - cleanDirectBuffer(copiedCompressedData); - cleanDirectBuffer(decompressedData); - } - } - - private void cleanDirectBuffer(ByteBuffer buffer) { - Cleaner cleaner = ((DirectBuffer) buffer).cleaner(); - if (cleaner != null) { - cleaner.clean(); - } } }