forked from BigfootDev/flatbuffers
avoiding NoSuchMethod exception (#6658)
This commit is contained in:
@@ -19,6 +19,7 @@ package com.google.flatbuffers;
|
||||
import static com.google.flatbuffers.Constants.*;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.Buffer;
|
||||
|
||||
/// @file
|
||||
/// @addtogroup flatbuffers_java_api
|
||||
@@ -49,7 +50,7 @@ public class ByteBufferUtil {
|
||||
*/
|
||||
public static ByteBuffer removeSizePrefix(ByteBuffer bb) {
|
||||
ByteBuffer s = bb.duplicate();
|
||||
s.position(s.position() + SIZE_PREFIX_LENGTH);
|
||||
((Buffer) s).position(s.position() + SIZE_PREFIX_LENGTH);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user