Make ByteBufferFactory an abstract class in order to make FlatBuffers compatible with Java7. (#5155)

Introduce a HeapByteBufferFactory singleton instance in order to reduce allocations.
Clarify the usage of LITTLE_ENDIAN ByteBuffers in ByteBufferFactory.
This commit is contained in:
Enrico Olivelli
2019-02-11 21:02:32 +01:00
committed by Wouter van Oortmerssen
parent 60e94cf083
commit 78fdce28c7
2 changed files with 12 additions and 7 deletions

View File

@@ -232,7 +232,7 @@ class JavaTest {
}
static void TestByteBufferFactory() {
final class MappedByteBufferFactory implements FlatBufferBuilder.ByteBufferFactory {
final class MappedByteBufferFactory extends FlatBufferBuilder.ByteBufferFactory {
@Override
public ByteBuffer newByteBuffer(int capacity) {
ByteBuffer bb;