瀏覽代碼

Move fields to the top in LWJGLBufferAllocator (#1441)

Reported by Codacy
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.
Michael Burnett 4 年之前
父節點
當前提交
8747a9cfe0
共有 1 個文件被更改,包括 15 次插入15 次删除
  1. 15 15
      jme3-lwjgl3/src/main/java/com/jme3/util/LWJGLBufferAllocator.java

+ 15 - 15
jme3-lwjgl3/src/main/java/com/jme3/util/LWJGLBufferAllocator.java

@@ -20,6 +20,21 @@ public class LWJGLBufferAllocator implements BufferAllocator {
     private static final Logger LOGGER = Logger.getLogger(LWJGLBufferAllocator.class.getName());
 
     public static final String PROPERTY_CONCURRENT_BUFFER_ALLOCATOR = "com.jme3.lwjgl3.ConcurrentBufferAllocator";
+    
+    /**
+     * The reference queue.
+     */
+    private static final ReferenceQueue<Buffer> DUMMY_QUEUE = new ReferenceQueue<>();
+        
+    /**
+     * The cleaner thread.
+     */
+    private static final Thread CLEAN_THREAD = new Thread(LWJGLBufferAllocator::freeByteBuffers);
+
+    /**
+     * The map with created deallocators.
+     */
+    private static final Map<Long, Deallocator> DEALLOCATORS = new ConcurrentHashMap<>();
 
     /**
      * Threadsafe implementation of the {@link LWJGLBufferAllocator}.
@@ -63,11 +78,6 @@ public class LWJGLBufferAllocator implements BufferAllocator {
         }
     }
 
-    /**
-     * The reference queue.
-     */
-    private static final ReferenceQueue<Buffer> DUMMY_QUEUE = new ReferenceQueue<>();
-
     /**
      * The LWJGL byte buffer deallocator.
      */
@@ -128,16 +138,6 @@ public class LWJGLBufferAllocator implements BufferAllocator {
         }
     }
 
-    /**
-     * The cleaner thread.
-     */
-    private static final Thread CLEAN_THREAD = new Thread(LWJGLBufferAllocator::freeByteBuffers);
-
-    /**
-     * The map with created deallocators.
-     */
-    private static final Map<Long, Deallocator> DEALLOCATORS = new ConcurrentHashMap<>();
-
     static {
         CLEAN_THREAD.setDaemon(true);
         CLEAN_THREAD.setName("Thread to free LWJGL byte buffers");