Jelajahi Sumber

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

Signed-off-by: Kai Boernert <[email protected]>
Kai Boernert 9 tahun lalu
induk
melakukan
810a4c3350

+ 2 - 2
jme3-core/src/main/java/com/jme3/util/ReflectionAllocator.java

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