whitespace tab to 4spaces formating only change

Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
define_list_fix
Kai Boernert 8 years ago
parent 810a4c3350
commit 846232063c
  1. 2
      jme3-core/src/main/java/com/jme3/util/BufferAllocator.java
  2. 11
      jme3-core/src/main/java/com/jme3/util/ReflectionAllocator.java

@ -1,9 +1,7 @@
package com.jme3.util; package com.jme3.util;
import java.lang.reflect.Method;
import java.nio.Buffer; import java.nio.Buffer;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
public interface BufferAllocator { public interface BufferAllocator {

@ -35,13 +35,12 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.nio.Buffer; import java.nio.Buffer;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
/** /**
* This class contains the reflection based way to remove DirectByteBuffers in java < 9, * This class contains the reflection based way to remove DirectByteBuffers in
* allocation is done via ByteBuffer.allocateDirect * java < 9, allocation is done via ByteBuffer.allocateDirect
*/ */
public final class ReflectionAllocator implements BufferAllocator { public final class ReflectionAllocator implements BufferAllocator {
private static Method cleanerMethod = null; private static Method cleanerMethod = null;
@ -59,7 +58,8 @@ public final class ReflectionAllocator implements BufferAllocator {
viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "attachment"); 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); ByteBuffer bb = ByteBuffer.allocateDirect(1);
Class<?> clazz = bb.getClass(); Class<?> clazz = bb.getClass();
try { try {
@ -106,7 +106,8 @@ public final class ReflectionAllocator implements BufferAllocator {
if (viewedBuffer != null) { if (viewedBuffer != null) {
destroyDirectBuffer((Buffer) viewedBuffer); destroyDirectBuffer((Buffer) viewedBuffer);
} else { } 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…
Cancel
Save