Procházet zdrojové kódy

add private constructors to utility classes

Stephen Gold před 4 roky
rodič
revize
1031e03d72
67 změnil soubory, kde provedl 429 přidání a 41 odebrání
  1. 7 1
      jme3-android/src/main/java/com/jme3/input/android/AndroidKeyMapping.java
  2. 6 0
      jme3-android/src/main/java/com/jme3/renderer/android/RendererUtil.java
  3. 6 0
      jme3-android/src/main/java/com/jme3/util/AndroidScreenshots.java
  4. 6 1
      jme3-bullet/src/common/java/com/jme3/bullet/util/CollisionShapeFactory.java
  5. 6 2
      jme3-core/src/main/java/com/jme3/anim/interpolator/AnimInterpolators.java
  6. 6 0
      jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java
  7. 5 0
      jme3-core/src/main/java/com/jme3/anim/util/AnimMigrationUtils.java
  8. 6 0
      jme3-core/src/main/java/com/jme3/anim/util/Primitives.java
  9. 6 0
      jme3-core/src/main/java/com/jme3/audio/AudioContext.java
  10. 7 1
      jme3-core/src/main/java/com/jme3/environment/LightProbeFactory.java
  11. 7 1
      jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java
  12. 6 0
      jme3-core/src/main/java/com/jme3/export/SavableClassUtil.java
  13. 7 1
      jme3-core/src/main/java/com/jme3/input/CameraInput.java
  14. 6 0
      jme3-core/src/main/java/com/jme3/input/JoystickCompatibilityMappings.java
  15. 7 1
      jme3-core/src/main/java/com/jme3/input/KeyNames.java
  16. 6 1
      jme3-core/src/main/java/com/jme3/material/Materials.java
  17. 6 0
      jme3-core/src/main/java/com/jme3/math/Easing.java
  18. 6 0
      jme3-core/src/main/java/com/jme3/math/MathUtils.java
  19. 6 1
      jme3-core/src/main/java/com/jme3/scene/control/AreaUtils.java
  20. 7 1
      jme3-core/src/main/java/com/jme3/shader/ShaderUtils.java
  21. 7 1
      jme3-core/src/main/java/com/jme3/shadow/PssmShadowUtil.java
  22. 7 1
      jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java
  23. 6 0
      jme3-core/src/main/java/com/jme3/system/JmeSystem.java
  24. 7 1
      jme3-core/src/main/java/com/jme3/system/JmeVersion.java
  25. 6 0
      jme3-core/src/main/java/com/jme3/texture/FrameBuffer.java
  26. 6 0
      jme3-core/src/main/java/com/jme3/util/BufferAllocatorFactory.java
  27. 6 0
      jme3-core/src/main/java/com/jme3/util/BufferUtils.java
  28. 7 1
      jme3-core/src/main/java/com/jme3/util/MemoryUtils.java
  29. 7 1
      jme3-core/src/main/java/com/jme3/util/PlaceholderAssets.java
  30. 7 1
      jme3-core/src/main/java/com/jme3/util/SkyFactory.java
  31. 6 0
      jme3-core/src/main/java/com/jme3/util/TangentBinormalGenerator.java
  32. 6 0
      jme3-core/src/main/java/com/jme3/util/TangentUtils.java
  33. 6 0
      jme3-core/src/main/java/com/jme3/util/mikktspace/MikktspaceTangentGenerator.java
  34. 7 1
      jme3-core/src/main/java/com/jme3/util/xml/SAXUtil.java
  35. 7 1
      jme3-core/src/plugins/java/com/jme3/export/binary/ByteUtils.java
  36. 7 1
      jme3-core/src/plugins/java/com/jme3/texture/plugins/DXTFlipper.java
  37. 7 1
      jme3-core/src/plugins/java/com/jme3/texture/plugins/ImageFlipper.java
  38. 7 1
      jme3-core/src/test/java/com/jme3/collision/CollisionUtil.java
  39. 6 0
      jme3-core/src/test/java/com/jme3/scene/MPOTestUtils.java
  40. 7 1
      jme3-core/src/test/java/com/jme3/system/TestUtil.java
  41. 7 1
      jme3-core/src/tools/java/jme3tools/converters/RGB565.java
  42. 7 1
      jme3-core/src/tools/java/jme3tools/savegame/SaveGame.java
  43. 7 1
      jme3-core/src/tools/java/jme3tools/shader/ShaderDebug.java
  44. 6 0
      jme3-desktop/src/main/java/com/jme3/util/Screenshots.java
  45. 6 0
      jme3-desktop/src/main/java/jme3tools/converters/ImageToAwt.java
  46. 6 0
      jme3-desktop/src/main/java/jme3tools/converters/MipMapGenerator.java
  47. 7 2
      jme3-effects/src/main/java/com/jme3/water/WaterUtils.java
  48. 5 0
      jme3-examples/src/main/java/jme3test/bullet/PhysicsTestHelper.java
  49. 6 0
      jme3-ios/src/main/java/com/jme3/renderer/ios/JmeIosGLES.java
  50. 7 1
      jme3-jbullet/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java
  51. 7 1
      jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwKeyMap.java
  52. 7 1
      jme3-networking/src/main/java/com/jme3/network/Filters.java
  53. 7 1
      jme3-networking/src/main/java/com/jme3/network/Network.java
  54. 7 1
      jme3-networking/src/main/java/com/jme3/network/service/rmi/RmiContext.java
  55. 7 1
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/anim/FbxAnimUtil.java
  56. 7 1
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/file/FbxReader.java
  57. 6 1
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/mesh/FbxMeshUtil.java
  58. 7 1
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/node/FbxNodeUtil.java
  59. 6 0
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/obj/FbxObjectFactory.java
  60. 7 1
      jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfUtils.java
  61. 6 1
      jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/lodcalc/util/EntropyComputeUtil.java
  62. 5 0
      jme3-terrain/src/main/java/com/jme3/terrain/noise/ShaderUtils.java
  63. 6 1
      jme3-vr/src/main/java/com/jme3/app/VRConstants.java
  64. 6 1
      jme3-vr/src/main/java/com/jme3/post/FilterUtil.java
  65. 6 0
      jme3-vr/src/main/java/com/jme3/post/PreNormalCaching.java
  66. 5 0
      jme3-vr/src/main/java/com/jme3/system/jopenvr/OpenVRUtil.java
  67. 6 0
      jme3-vr/src/main/java/com/jme3/util/VRUtil.java

+ 7 - 1
jme3-android/src/main/java/com/jme3/input/android/AndroidKeyMapping.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -143,6 +143,12 @@ public class AndroidKeyMapping {
         0x0,//mute
     };
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private AndroidKeyMapping() {
+    }
+
     public static int getJmeKey(int androidKey) {
         if (androidKey > ANDROID_TO_JME.length) {
             return androidKey;

+ 6 - 0
jme3-android/src/main/java/com/jme3/renderer/android/RendererUtil.java

@@ -51,6 +51,12 @@ public class RendererUtil {
      */
     public static boolean ENABLE_ERROR_CHECKING = true;
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private RendererUtil() {
+    }
+
     /**
      * Checks for an OpenGL error and throws a {@link RendererException} if
      * there is one. Ignores the value of

+ 6 - 0
jme3-android/src/main/java/com/jme3/util/AndroidScreenshots.java

@@ -8,6 +8,12 @@ public final class AndroidScreenshots {
 
     private static final Logger logger = Logger.getLogger(AndroidScreenshots.class.getName());
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private AndroidScreenshots() {
+    }
+
     /**
      * Convert OpenGL GLES20.GL_RGBA to Bitmap.Config.ARGB_8888 and store result
      * in a Bitmap

+ 6 - 1
jme3-bullet/src/common/java/com/jme3/bullet/util/CollisionShapeFactory.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -51,6 +51,11 @@ import java.util.LinkedList;
  * @author normenhansen, tim8dev
  */
 public class CollisionShapeFactory {
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private CollisionShapeFactory() {
+    }
 
     /**
      * Calculate the correct transform for a collision shape relative to the

+ 6 - 2
jme3-core/src/main/java/com/jme3/anim/interpolator/AnimInterpolators.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -176,5 +176,9 @@ public class AnimInterpolators {
 
     public static final TimeInterpolator constant = new TimeInterpolator(Easing.constant);
 
-
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private AnimInterpolators() {
+    }
 }

+ 6 - 0
jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java

@@ -52,6 +52,12 @@ public class Tweens {
     private static final CurveFunction SMOOTH = new SmoothStep();
     private static final CurveFunction SINE = new Sine();
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private Tweens() {
+    }
+
     /**
      * Creates a tween that will interpolate over an entire sequence
      * of tweens in order.

+ 5 - 0
jme3-core/src/main/java/com/jme3/anim/util/AnimMigrationUtils.java

@@ -13,6 +13,11 @@ public class AnimMigrationUtils {
     final private static AnimControlVisitor animControlVisitor = new AnimControlVisitor();
     final private static SkeletonControlVisitor skeletonControlVisitor = new SkeletonControlVisitor();
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private AnimMigrationUtils() {
+    }
 
     public static Spatial migrate(Spatial source) {
         Map<Skeleton, Armature> skeletonArmatureMap = new HashMap<>();

+ 6 - 0
jme3-core/src/main/java/com/jme3/anim/util/Primitives.java

@@ -33,6 +33,12 @@ public class Primitives {
         PRIMITIVE_TO_WRAPPER_TYPE = Collections.unmodifiableMap(primToWrap);
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private Primitives() {
+    }
+
     /**
      * Returns the corresponding wrapper type of {@code type} if it is a primitive type; otherwise
      * returns {@code type} itself. Idempotent.

+ 6 - 0
jme3-core/src/main/java/com/jme3/audio/AudioContext.java

@@ -40,6 +40,12 @@ public class AudioContext {
 
     final private static ThreadLocal<AudioRenderer> audioRenderer = new ThreadLocal<AudioRenderer>();
  
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private AudioContext() {
+    }
+
     public static void setAudioRenderer( AudioRenderer ar ) {
         audioRenderer.set(ar);       
     }

+ 7 - 1
jme3-core/src/main/java/com/jme3/environment/LightProbeFactory.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -72,6 +72,12 @@ import java.util.concurrent.ScheduledThreadPoolExecutor;
  */
 public class LightProbeFactory {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private LightProbeFactory() {
+    }
+
     /**
      * Creates a LightProbe with the giver EnvironmentCamera in the given scene.
      * 

+ 7 - 1
jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -90,6 +90,12 @@ public class EnvMapUtils {
         HighQuality
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private EnvMapUtils() {
+    }
+
     /**
      * Creates a cube map from 6 images
      *

+ 6 - 0
jme3-core/src/main/java/com/jme3/export/SavableClassUtil.java

@@ -80,6 +80,12 @@ public class SavableClassUtil {
         addRemapping("com.jme3.scene.plugins.blender.objects.Properties", NullSavable.class);
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private SavableClassUtil() {
+    }
+
     private static String remapClass(String className) throws ClassNotFoundException {
         String result = CLASS_REMAPPINGS.get(className);
         if (result == null) {

+ 7 - 1
jme3-core/src/main/java/com/jme3/input/CameraInput.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -140,4 +140,10 @@ public class CameraInput {
     public final static String FLYCAM_LOWER = "FLYCAM_Lower";
     
     public final static String FLYCAM_INVERTY = "FLYCAM_InvertY";
+    
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private CameraInput() {
+    }
 }

+ 6 - 0
jme3-core/src/main/java/com/jme3/input/JoystickCompatibilityMappings.java

@@ -73,6 +73,12 @@ public class JoystickCompatibilityMappings {
         loadDefaultMappings();
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private JoystickCompatibilityMappings() {
+    }
+
     protected static Map<String,String> getMappings( String joystickName, boolean create ) {
         Map<String,String> result = joystickMappings.get(joystickName.trim());
         if( result == null && create ) {

+ 7 - 1
jme3-core/src/main/java/com/jme3/input/KeyNames.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -180,6 +180,12 @@ public class KeyNames {
         KEY_NAMES[KEY_UNLABELED] = "Unlabeled";
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private KeyNames() {
+    }
+
     public static String getName(int keyId) {
         return KEY_NAMES[keyId];
     }

+ 6 - 1
jme3-core/src/main/java/com/jme3/material/Materials.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,4 +42,9 @@ public class Materials {
     public static final String LIGHTING = "Common/MatDefs/Light/Lighting.j3md";
     public static final String PBR = "Common/MatDefs/Light/PBRLighting.j3md";
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private Materials() {
+    }
 }

+ 6 - 0
jme3-core/src/main/java/com/jme3/math/Easing.java

@@ -167,6 +167,12 @@ public class Easing {
         }
     };
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private Easing() {
+    }
+
     /**
      * An Ease function composed of 2 sb function for custom in and out easing
      */

+ 6 - 0
jme3-core/src/main/java/com/jme3/math/MathUtils.java

@@ -38,6 +38,12 @@ import com.jme3.util.TempVars;
  * Created by Nehon on 23/04/2017.
  */
 public class MathUtils {
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private MathUtils() {
+    }
+
     /**
      * Calculate the natural logarithm of a unit quaternion.
      *

+ 6 - 1
jme3-core/src/main/java/com/jme3/scene/control/AreaUtils.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,6 +44,11 @@ import com.jme3.math.FastMath;
  */
 
 public class AreaUtils {
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private AreaUtils() {
+    }
 
   /**
    * Estimate the screen area of a bounding volume. If the volume isn't a

+ 7 - 1
jme3-core/src/main/java/com/jme3/shader/ShaderUtils.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -33,6 +33,12 @@ package com.jme3.shader;
 
 public class ShaderUtils {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private ShaderUtils() {
+    }
+
     public static String convertToGLSL130(String input, boolean isFrag) {
         StringBuilder sb = new StringBuilder();
         sb.append("#version 130\n");

+ 7 - 1
jme3-core/src/main/java/com/jme3/shadow/PssmShadowUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2019 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -51,6 +51,12 @@ import static java.lang.Math.min;
  */
 public final class PssmShadowUtil {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private PssmShadowUtil() {
+    }
+
     /**
      * Updates the frustum splits stores in <code>splits</code> using PSSM.
      */

+ 7 - 1
jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -61,6 +61,12 @@ import java.util.List;
  */
 public class ShadowUtil {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private ShadowUtil() {
+    }
+
     /**
      * Updates a points arrays with the frustum corners of the provided camera.
      *

+ 6 - 0
jme3-core/src/main/java/com/jme3/system/JmeSystem.java

@@ -53,6 +53,12 @@ public class JmeSystem {
 
     private static JmeSystemDelegate systemDelegate;
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private JmeSystem() {
+    }
+
     public static void setSystemDelegate(JmeSystemDelegate systemDelegate) {
         JmeSystem.systemDelegate = systemDelegate;
     }

+ 7 - 1
jme3-core/src/main/java/com/jme3/system/JmeVersion.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -63,4 +63,10 @@ public class JmeVersion {
     public static final String VERSION_TAG      = props.getProperty("version.tag", "");
     public static final String VERSION_FULL     = props.getProperty("version.full", "");
     public static final String FULL_NAME        = props.getProperty("name.full", "jMonkeyEngine (unknown version)");
+    
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private JmeVersion() {
+    }
 }

+ 6 - 0
jme3-core/src/main/java/com/jme3/texture/FrameBuffer.java

@@ -214,6 +214,7 @@ public class FrameBuffer extends NativeObject {
     }
 
     public static class FrameBufferTarget {
+        private FrameBufferTarget(){}
         public static FrameBufferTextureTarget newTarget(Texture tx){
             FrameBufferTextureTarget t=new FrameBufferTextureTarget();
             t.setTexture(tx);
@@ -227,6 +228,11 @@ public class FrameBuffer extends NativeObject {
         }
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private FrameBuffer() {
+    }
 
     public void addColorTarget(FrameBufferBufferTarget colorBuf){
         colorBuf.slot=colorBufs.size();

+ 6 - 0
jme3-core/src/main/java/com/jme3/util/BufferAllocatorFactory.java

@@ -17,6 +17,12 @@ public class BufferAllocatorFactory {
 
     private static final Logger LOGGER = Logger.getLogger(BufferAllocatorFactory.class.getName());
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private BufferAllocatorFactory() {
+    }
+
     @Internal
     protected static BufferAllocator create() {
 

+ 6 - 0
jme3-core/src/main/java/com/jme3/util/BufferUtils.java

@@ -69,6 +69,12 @@ public final class BufferUtils {
     final private static ConcurrentHashMap<BufferInfo, BufferInfo> trackedBuffers = new ConcurrentHashMap<BufferInfo, BufferInfo>();
     static ClearReferences cleanupthread;
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private BufferUtils() {
+    }
+
     /**
      * Set it to true if you want to enable direct memory tracking for debugging
      * purpose. Default is false. To print direct memory usage use

+ 7 - 1
jme3-core/src/main/java/com/jme3/util/MemoryUtils.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -55,6 +55,12 @@ public class MemoryUtils {
         }
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private MemoryUtils() {
+    }
+
     /**
      * 
      * @return the direct memory used in byte.

+ 7 - 1
jme3-core/src/main/java/com/jme3/util/PlaceholderAssets.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -71,6 +71,12 @@ public class PlaceholderAssets {
         (byte)0xFF, (byte)0xFF, (byte)0xFF,
     };
     
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private PlaceholderAssets() {
+    }
+
     @Deprecated
     public static Image getPlaceholderImage(){
         ByteBuffer tempData = BufferUtils.createByteBuffer(3 * 4 * 4);

+ 7 - 1
jme3-core/src/main/java/com/jme3/util/SkyFactory.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2019 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -80,6 +80,12 @@ public class SkyFactory {
         EquirectMap
     }
     
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private SkyFactory() {
+    }
+
     /**
      * Create a sky with radius=10 using the given cubemap or spheremap texture.
      *

+ 6 - 0
jme3-core/src/main/java/com/jme3/util/TangentBinormalGenerator.java

@@ -117,6 +117,12 @@ public class TangentBinormalGenerator {
         }
     }
     
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private TangentBinormalGenerator() {
+    }
+
     private static List<VertexData> initVertexData(int size) {
         List<VertexData> vertices = new ArrayList<>(size);        
         for (int i = 0; i < size; i++) {

+ 6 - 0
jme3-core/src/main/java/com/jme3/util/TangentUtils.java

@@ -38,6 +38,12 @@ import com.jme3.scene.*;
  */
 public class TangentUtils {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private TangentUtils() {
+    }
+
     public static void generateBindPoseTangentsIfNecessary(Mesh mesh){
         if (mesh.getBuffer(VertexBuffer.Type.BindPosePosition) != null) {
 

+ 6 - 0
jme3-core/src/main/java/com/jme3/util/mikktspace/MikktspaceTangentGenerator.java

@@ -68,6 +68,12 @@ public class MikktspaceTangentGenerator {
     private final static long INTERNAL_RND_SORT_SEED = 39871946 & 0xffffffffL;
     static final int CELLS = 2048;
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private MikktspaceTangentGenerator() {
+    }
+
     static int makeIndex(final int face, final int vert) {
         assert (vert >= 0 && vert < 4 && face >= 0);
         return (face << 2) | (vert & 0x3);

+ 7 - 1
jme3-core/src/main/java/com/jme3/util/xml/SAXUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2019 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,6 +41,12 @@ import org.xml.sax.SAXException;
  */
 public final class SAXUtil {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private SAXUtil() {
+    }
+
     /**
      * Parses an integer from a string, if the string is null returns
      * def.

+ 7 - 1
jme3-core/src/plugins/java/com/jme3/export/binary/ByteUtils.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,6 +44,12 @@ import java.io.OutputStream;
  */
 public class ByteUtils {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private ByteUtils() {
+    }
+
     /**
      * Takes an InputStream and returns the complete byte content of it
      * 

+ 7 - 1
jme3-core/src/plugins/java/com/jme3/texture/plugins/DXTFlipper.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -50,6 +50,12 @@ public class DXTFlipper {
         bb.order(ByteOrder.LITTLE_ENDIAN);
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private DXTFlipper() {
+    }
+
     private static long readCode5(long data, int x, int y){
         long shift =   (4 * y + x) * 3;
         long mask = 0x7;

+ 7 - 1
jme3-core/src/plugins/java/com/jme3/texture/plugins/ImageFlipper.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,6 +44,12 @@ import java.nio.ByteBuffer;
  */
 public class ImageFlipper {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private ImageFlipper() {
+    }
+
     public static void flipImage(Image img, int index){
         if (img.getFormat().isCompressed())
             throw new UnsupportedOperationException("Flipping compressed " +

+ 7 - 1
jme3-core/src/test/java/com/jme3/collision/CollisionUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2015 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -40,6 +40,12 @@ import com.jme3.bounding.BoundingVolume;
  */
 final class CollisionUtil {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private CollisionUtil() {
+    }
+
     private static void checkCollisionBase(Collidable a, Collidable b, int expected) {
         // Test bounding volume methods
         if (a instanceof BoundingVolume && b instanceof BoundingVolume) {

+ 6 - 0
jme3-core/src/test/java/com/jme3/scene/MPOTestUtils.java

@@ -52,6 +52,12 @@ public class MPOTestUtils {
         }
     };
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private MPOTestUtils() {
+    }
+
     private static void validateSubScene(Spatial scene) {
         scene.checkCulling(DUMMY_CAM);
 

+ 7 - 1
jme3-core/src/test/java/com/jme3/system/TestUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2015 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,6 +44,12 @@ public class TestUtil {
         JmeSystem.setSystemDelegate(new MockJmeSystemDelegate());
     }
     
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private TestUtil() {
+    }
+
     public static AssetManager createAssetManager() {
         Logger.getLogger(AssetConfig.class.getName()).setLevel(Level.OFF);
         return new DesktopAssetManager(true);

+ 7 - 1
jme3-core/src/tools/java/jme3tools/converters/RGB565.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,12 @@ package jme3tools.converters;
  */
 public class RGB565 {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private RGB565() {
+    }
+
     public static short ARGB8_to_RGB565(int argb){
         int a = (argb & 0xFF000000) >> 24;
         int r = (argb & 0x00FF0000) >> 16;

+ 7 - 1
jme3-core/src/tools/java/jme3tools/savegame/SaveGame.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -55,6 +55,12 @@ import java.util.zip.GZIPOutputStream;
  */
 public class SaveGame {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private SaveGame() {
+    }
+
     /**
      * Saves a savable in a system-dependent way.
      * @param gamePath A unique path for this game, e.g. com/mycompany/mygame

+ 7 - 1
jme3-core/src/tools/java/jme3tools/shader/ShaderDebug.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,12 @@ package jme3tools.shader;
  */
 public class ShaderDebug {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private ShaderDebug() {
+    }
+
     /**
      * Append the line numbers to the source code of a shader to output it
      * @param source the source

+ 6 - 0
jme3-desktop/src/main/java/com/jme3/util/Screenshots.java

@@ -40,6 +40,12 @@ import java.nio.IntBuffer;
 
 public final class Screenshots {
     
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private Screenshots() {
+    }
+
     public static void convertScreenShot2(IntBuffer bgraBuf, BufferedImage out){
         WritableRaster wr = out.getRaster();
         DataBufferInt db = (DataBufferInt) wr.getDataBuffer();

+ 6 - 0
jme3-desktop/src/main/java/jme3tools/converters/ImageToAwt.java

@@ -177,6 +177,12 @@ public class ImageToAwt {
         
     }
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private ImageToAwt() {
+    }
+
     private static int Ix(int x, int y, int w){
         return y * w + x;
     }

+ 6 - 0
jme3-desktop/src/main/java/jme3tools/converters/MipMapGenerator.java

@@ -44,6 +44,12 @@ import java.util.ArrayList;
 
 public class MipMapGenerator {
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private MipMapGenerator() {
+    }
+
     private static BufferedImage scaleDown(BufferedImage sourceImage, int targetWidth, int targetHeight) {
         int sourceWidth  = sourceImage.getWidth();
         int sourceHeight = sourceImage.getHeight();

+ 7 - 2
jme3-effects/src/main/java/com/jme3/water/WaterUtils.java

@@ -40,8 +40,13 @@ import com.jme3.util.TempVars;
  *
  * @author Nehon
  */
-public class WaterUtils {
-    
+public class WaterUtils {    
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private WaterUtils() {
+    }
+
     public static void updateReflectionCam(Camera reflectionCam, Plane plane, Camera sceneCam){
         
         TempVars vars = TempVars.get();

+ 5 - 0
jme3-examples/src/main/java/jme3test/bullet/PhysicsTestHelper.java

@@ -63,6 +63,11 @@ import com.jme3.util.BufferUtils;
  * @author normenhansen
  */
 public class PhysicsTestHelper {
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private PhysicsTestHelper() {
+    }
 
     /**
      * creates a simple physics test world with a floor, an obstacle and some test boxes

+ 6 - 0
jme3-ios/src/main/java/com/jme3/renderer/ios/JmeIosGLES.java

@@ -135,6 +135,12 @@ public class JmeIosGLES {
 	public static final int GL_VERTEX_SHADER = 0x00008b31;
 	public static final int GL_ZERO = 0x00000000;
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private JmeIosGLES() {
+    }
+
 	public static native void glActiveTexture(int texture);
 	public static native void glAttachShader(int program, int shader);
 	public static native void glBindBuffer(int target, int buffer);

+ 7 - 1
jme3-jbullet/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2019 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -64,6 +64,12 @@ public class DebugShapeFactory {
     /** The minimum corner for the aabb used for triangles to include in ConcaveShape processing.*/
     private static final Vector3f aabbMin = new Vector3f(-1e30f, -1e30f, -1e30f);
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private DebugShapeFactory() {
+    }
+
     /**
      * Creates a debug shape from the given collision shape. This is mostly used internally.<br>
      * To attach a debug shape to a physics object, call <code>attachDebugShape(AssetManager manager);</code> on it.

+ 7 - 1
jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwKeyMap.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2015 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,12 @@ public class GlfwKeyMap {
 
     private static final int[] GLFW_TO_JME_KEY_MAP = new int[GLFW_KEY_LAST + 1];
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private GlfwKeyMap() {
+    }
+
     private static void reg(final int jmeKey, final int glfwKey) {
         GLFW_TO_JME_KEY_MAP[glfwKey] = jmeKey;
     }

+ 7 - 1
jme3-networking/src/main/java/com/jme3/network/Filters.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,6 +43,12 @@ import java.util.HashSet;
  */
 public class Filters 
 {
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private Filters() {
+    }
+
     /**
      *  Creates a filter that returns true for any value in the specified
      *  list of values and false for all other cases.

+ 7 - 1
jme3-networking/src/main/java/com/jme3/network/Network.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -53,6 +53,12 @@ public class Network
     public static final String DEFAULT_GAME_NAME = "Unnamed jME3 Game";
     public static final int DEFAULT_VERSION = 42;
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private Network() {
+    }
+
     /**
      *  Creates a Server that will utilize both reliable and fast
      *  transports to communicate with clients.  The specified port

+ 7 - 1
jme3-networking/src/main/java/com/jme3/network/service/rmi/RmiContext.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 jMonkeyEngine
+ * Copyright (c) 2015-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -46,6 +46,12 @@ import com.jme3.network.HostedConnection;
 public class RmiContext {
     private static final ThreadLocal<HostedConnection> connection = new ThreadLocal<HostedConnection>();
  
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private RmiContext() {
+    }
+
     /**
      *  Returns the HostedConnection that is responsible for any
      *  RMI-related calls on this thread.

+ 7 - 1
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/anim/FbxAnimUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2015 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,4 +41,10 @@ public class FbxAnimUtil {
     public static final String CURVE_NODE_PROPERTY_Y          = "d|Y";
     public static final String CURVE_NODE_PROPERTY_Z          = "d|Z";
     public static final String CURVE_NODE_PROPERTY_VISIBILITY = "d|Visibility";
+
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private FbxAnimUtil() {
+    }
 }

+ 7 - 1
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/file/FbxReader.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2014 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -50,6 +50,12 @@ public class FbxReader {
 	 */
 	public static final byte[] HEAD_MAGIC = new byte[]{0x4b, 0x61, 0x79, 0x64, 0x61, 0x72, 0x61, 0x20, 0x46, 0x42, 0x58, 0x20, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x20, 0x00, 0x1a, 0x00};
 
+        /**
+         * A private constructor to inhibit instantiation of this class.
+         */
+        private FbxReader() {
+        }
+
 	public static FbxFile readFBX(InputStream stream) throws IOException {
 		FbxFile fbxFile = new FbxFile();
 		// Read file to byte buffer so we can know current position in file

+ 6 - 1
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/mesh/FbxMeshUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2015 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,11 @@ package com.jme3.scene.plugins.fbx.mesh;
 import com.jme3.scene.plugins.fbx.file.FbxElement;
 
 public class FbxMeshUtil {
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private FbxMeshUtil() {
+    }
 
     public static double[] getDoubleArray(FbxElement el) {
         if (el.propertiesTypes[0] == 'd') {

+ 7 - 1
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/node/FbxNodeUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2015 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,6 +35,12 @@ import com.jme3.math.FastMath;
 import com.jme3.math.Quaternion;
 
 public class FbxNodeUtil {
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private FbxNodeUtil() {
+    }
+
     public static Quaternion quatFromBoneAngles(float xAngle, float yAngle, float zAngle) {
         float angle;
         float sinY, sinZ, sinX, cosY, cosZ, cosX;

+ 6 - 0
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/obj/FbxObjectFactory.java

@@ -59,6 +59,12 @@ public final class FbxObjectFactory {
     
     private static final Logger logger = Logger.getLogger(FbxObjectFactory.class.getName());
     
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private FbxObjectFactory() {
+    }
+
     private static Class<? extends FbxObject> getImplementingClass(String elementName, String subclassName) {
         if (elementName.equals("NodeAttribute")) {
             if (subclassName.equals("Root")) {

+ 7 - 1
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfUtils.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,6 +52,12 @@ public class GltfUtils {
 
     private static final Logger logger = Logger.getLogger(GltfUtils.class.getName());
 
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private GltfUtils() {
+    }
+
     public static Mesh.Mode getMeshMode(Integer mode) {
         if (mode == null) {
             return Mesh.Mode.Triangles;

+ 6 - 1
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/lodcalc/util/EntropyComputeUtil.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -55,6 +55,11 @@ import java.nio.ShortBuffer;
  * @author Kirill Vainer
  */
 public class EntropyComputeUtil {
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private EntropyComputeUtil() {
+    }
 
     public static float computeLodEntropy(Mesh terrainBlock, Buffer lodIndices){
         // Bounding box for the terrain block

+ 5 - 0
jme3-terrain/src/main/java/com/jme3/terrain/noise/ShaderUtils.java

@@ -46,6 +46,11 @@ import java.nio.ByteOrder;
  * 
  */
 public class ShaderUtils {
+        /**
+         * A private constructor to inhibit instantiation of this class.
+         */
+        private ShaderUtils() {
+        }
 
 	public static final float[] i2c(final int color) {
 		return new float[] { (color & 0x00ff0000) / 256f, (color & 0x0000ff00) / 256f, (color & 0x000000ff) / 256f,

+ 6 - 1
jme3-vr/src/main/java/com/jme3/app/VRConstants.java

@@ -156,5 +156,10 @@ public class VRConstants {
      * @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
      */
     public static final int SETTING_VRAPI_OCULUSVR_VALUE    = 4;
-    
+
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private VRConstants() {
+    }
 }

+ 6 - 1
jme3-vr/src/main/java/com/jme3/post/FilterUtil.java

@@ -10,7 +10,12 @@ import com.jme3.shadow.DirectionalLightShadowFilter;
  * @author Rickard
  */
 public class FilterUtil {
-    
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private FilterUtil() {
+    }
+
     public static FogFilter cloneFogFilter(FogFilter fogFilter){
         FogFilter filterClone = new FogFilter();
         filterClone.setFogColor(fogFilter.getFogColor());

+ 6 - 0
jme3-vr/src/main/java/com/jme3/post/PreNormalCaching.java

@@ -17,6 +17,12 @@ public class PreNormalCaching {
     private static FrameBuffer cachedPreNormals;
     private static int lastNormalPassesCount, curCount;
     
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private PreNormalCaching() {
+    }
+
     /**
      * Get pre-normals from the given rendering.
      * @param renderManager the render manager.

+ 5 - 0
jme3-vr/src/main/java/com/jme3/system/jopenvr/OpenVRUtil.java

@@ -16,6 +16,11 @@ import com.sun.jna.ptr.IntByReference;
  * @author Julien Seinturier - 2017 - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
  */
 public class OpenVRUtil {
+        /**
+         * A private constructor to inhibit instantiation of this class.
+         */
+        private OpenVRUtil() {
+        }
 
 	/**
 	 * Get the value of the given string {@link JOpenVRLibrary.ETrackedDeviceProperty property} attached to the given device.

+ 6 - 0
jme3-vr/src/main/java/com/jme3/util/VRUtil.java

@@ -17,6 +17,12 @@ public class VRUtil {
     private static final long SLEEP_PRECISION = TimeUnit.MILLISECONDS.toNanos(4);
     private static final long SPIN_YIELD_PRECISION = TimeUnit.MILLISECONDS.toNanos(2);
     
+    /**
+     * A private constructor to inhibit instantiation of this class.
+     */
+    private VRUtil() {
+    }
+
     public static void sleepNanos(long nanoDuration) {
         final long end = System.nanoTime() + nanoDuration; 
         long timeLeft = nanoDuration;