We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1eaffc2 commit 0ca525dCopy full SHA for 0ca525d
bson/src/main/org/bson/io/BasicOutputBuffer.java
@@ -160,6 +160,7 @@ public void truncateToPosition(final int newPosition) {
160
if (newPosition > buffer.position() || newPosition < 0) {
161
throw new IllegalArgumentException();
162
}
163
+ // The cast is required for compatibility with JDK 9+ where ByteBuffer's position method is inherited from Buffer.
164
((Buffer) buffer).position(newPosition);
165
166
0 commit comments