* Fix BufferUtils.destroyDirectBuffer() in OpenJDK7

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9264 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
Sha..rd 2012-03-25 19:28:05 +00:00
parent 8973175783
commit 828c8071f6

View File

@ -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");