fix for wrongly marking as used, thanks to AlrikG for finding this

Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
This commit is contained in:
Kai Boernert 2016-07-20 10:46:37 +02:00
parent 5e04039390
commit 810a4c3350

View File

@ -59,8 +59,8 @@ public final class ReflectionAllocator implements BufferAllocator {
viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "attachment"); viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "attachment");
} }
// Apache Harmony // Apache Harmony (allocated directly, to not trigger allocator used logic in BufferUtils)
ByteBuffer bb = BufferUtils.createByteBuffer(1); ByteBuffer bb = ByteBuffer.allocateDirect(1);
Class<?> clazz = bb.getClass(); Class<?> clazz = bb.getClass();
try { try {
freeMethod = clazz.getMethod("free"); freeMethod = clazz.getMethod("free");