* Fix BufferUtils.destroyDirectBuffer() in OpenJDK7

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9264 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent 8973175783
commit 828c8071f6
  1. 4
      engine/src/core/com/jme3/util/BufferUtils.java

@ -1177,6 +1177,10 @@ public final class BufferUtils {
cleanerMethod = loadMethod("sun.nio.ch.DirectBuffer", "cleaner");
cleanMethod = loadMethod("sun.misc.Cleaner", "clean");
viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "viewedBuffer");
if (viewedBufferMethod == null){
// They changed the name in Java 7 (???)
viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "attachment");
}
// Apache Harmony
freeMethod = loadMethod("org.apache.harmony.nio.internal.DirectBuffer", "free");

Loading…
Cancel
Save