whitespace tab to 4spaces formating only change
Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
This commit is contained in:
parent
810a4c3350
commit
846232063c
@ -1,9 +1,7 @@
|
||||
package com.jme3.util;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.DoubleBuffer;
|
||||
|
||||
public interface BufferAllocator {
|
||||
|
||||
|
@ -35,13 +35,12 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.DoubleBuffer;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* This class contains the reflection based way to remove DirectByteBuffers in java < 9,
|
||||
* allocation is done via ByteBuffer.allocateDirect
|
||||
* This class contains the reflection based way to remove DirectByteBuffers in
|
||||
* java < 9, allocation is done via ByteBuffer.allocateDirect
|
||||
*/
|
||||
public final class ReflectionAllocator implements BufferAllocator {
|
||||
private static Method cleanerMethod = null;
|
||||
@ -59,7 +58,8 @@ public final class ReflectionAllocator implements BufferAllocator {
|
||||
viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "attachment");
|
||||
}
|
||||
|
||||
// Apache Harmony (allocated directly, to not trigger allocator used logic in BufferUtils)
|
||||
// Apache Harmony (allocated directly, to not trigger allocator used
|
||||
// logic in BufferUtils)
|
||||
ByteBuffer bb = ByteBuffer.allocateDirect(1);
|
||||
Class<?> clazz = bb.getClass();
|
||||
try {
|
||||
@ -106,7 +106,8 @@ public final class ReflectionAllocator implements BufferAllocator {
|
||||
if (viewedBuffer != null) {
|
||||
destroyDirectBuffer((Buffer) viewedBuffer);
|
||||
} else {
|
||||
Logger.getLogger(BufferUtils.class.getName()).log(Level.SEVERE, "Buffer cannot be destroyed: {0}", toBeDestroyed);
|
||||
Logger.getLogger(BufferUtils.class.getName()).log(Level.SEVERE,
|
||||
"Buffer cannot be destroyed: {0}", toBeDestroyed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user