Skip to content

Commit

Permalink
[FLINK-11905][table-runtime-blink] Fix BlockCompressionTest does not …
Browse files Browse the repository at this point in the history
…compile with Java 9 (apache#7981)
  • Loading branch information
KurtYoung authored Mar 14, 2019
1 parent e20a9f8 commit c6878ac
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
}
}
}

0 comments on commit c6878ac

Please sign in to comment.