diff --git a/pom.xml b/pom.xml
index f50f174..5b48f7c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
software.coley
lljzip
- 1.3.0
+ 1.3.1
LL Java ZIP
Lower level ZIP support for Java
diff --git a/src/main/java/software/coley/llzip/util/BufferData.java b/src/main/java/software/coley/llzip/util/BufferData.java
index 0f6454d..2de6094 100644
--- a/src/main/java/software/coley/llzip/util/BufferData.java
+++ b/src/main/java/software/coley/llzip/util/BufferData.java
@@ -2,6 +2,7 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -39,11 +40,13 @@ public byte get(long position) {
@Override
public void get(long position, byte[] b, int off, int len) {
ensureOpen();
+ // Left intentionally as unchained calls due to API differences across Java versions
+ // and how the compiler changes output.
ByteBuffer buffer = this.buffer;
- ((ByteBuffer) buffer.slice()
- .order(buffer.order())
- .position(validate(position)))
- .get(b, off, len);
+ buffer.slice();
+ buffer.order(buffer.order());
+ buffer.position(validate(position));
+ buffer.get(b, off, len);
}
@Override