avoiding even more NoSuchMethod exceptions (#6729)

* avoiding more NoSuchMethod exceptions

refs #6657

* avoiding even more NoSuchMethod exceptions

refs #6657
This commit is contained in:
Kamil Rojewski
2021-08-05 21:25:23 +02:00
committed by GitHub
parent a7b527d942
commit 6fb2c90d9e
4 changed files with 12 additions and 12 deletions

View File

@@ -1089,10 +1089,10 @@ public class FlatBufferBuilder {
*/
public InputStream sizedInputStream() {
finished();
ByteBuffer duplicate = bb.duplicate();
((Buffer) duplicate).position(space);
Buffer duplicate = ((Buffer) bb).duplicate();
duplicate.position(space);
duplicate.limit(bb.capacity());
return new ByteBufferBackedInputStream(duplicate);
return new ByteBufferBackedInputStream((ByteBuffer) duplicate);
}
/**