diff --git a/src/main/java/org/broadinstitute/hellbender/utils/nio/SeekableByteChannelPrefetcher.java b/src/main/java/org/broadinstitute/hellbender/utils/nio/SeekableByteChannelPrefetcher.java index deb93575085..40b18fdbb1e 100644 --- a/src/main/java/org/broadinstitute/hellbender/utils/nio/SeekableByteChannelPrefetcher.java +++ b/src/main/java/org/broadinstitute/hellbender/utils/nio/SeekableByteChannelPrefetcher.java @@ -1,6 +1,8 @@ package org.broadinstitute.hellbender.utils.nio; import com.google.common.base.Stopwatch; + +import java.nio.Buffer; import java.util.concurrent.ThreadFactory; import org.broadinstitute.hellbender.exceptions.GATKException; @@ -142,7 +144,7 @@ public ByteBuffer getBuf() throws ExecutionException, InterruptedException { public WorkUnit resetForIndex(long blockIndex) { this.blockIndex = blockIndex; - buf.clear(); + ((Buffer) buf).clear(); // for Java 11, see https://github.com/jruby/jruby/issues/5450 futureBuf = null; return this; }