Explorar el Código

use diamond notation when it clarifies the code

Stephen Gold hace 4 años
padre
commit
c3e06bd507
Se han modificado 93 ficheros con 231 adiciones y 231 borrados
  1. 1 1
      jme3-android-examples/src/main/java/jme3test/android/TestAndroidSensors.java
  2. 3 3
      jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/CustomArrayAdapter.java
  3. 2 2
      jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java
  4. 2 2
      jme3-android/src/main/java/com/jme3/app/state/MjpegFileWriter.java
  5. 1 1
      jme3-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java
  6. 2 2
      jme3-android/src/main/java/com/jme3/input/android/AndroidJoyInput.java
  7. 5 5
      jme3-android/src/main/java/com/jme3/input/android/AndroidJoystickJoyInput14.java
  8. 3 3
      jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.java
  9. 3 3
      jme3-android/src/main/java/com/jme3/input/android/AndroidTouchInput.java
  10. 2 2
      jme3-android/src/main/java/com/jme3/input/android/AndroidTouchInput14.java
  11. 2 2
      jme3-bullet/src/common/java/com/jme3/bullet/animation/RagUtils.java
  12. 5 5
      jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.java
  13. 3 3
      jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollPreset.java
  14. 4 4
      jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollUtils.java
  15. 6 6
      jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletDebugAppState.java
  16. 4 4
      jme3-desktop/src/main/java/com/jme3/app/SettingsDialog.java
  17. 2 2
      jme3-desktop/src/main/java/com/jme3/app/state/MjpegFileWriter.java
  18. 1 1
      jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java
  19. 1 1
      jme3-desktop/src/main/java/com/jme3/cursors/plugins/CursorLoader.java
  20. 2 2
      jme3-desktop/src/main/java/com/jme3/input/awt/AwtKeyInput.java
  21. 3 3
      jme3-desktop/src/main/java/com/jme3/input/awt/AwtMouseInput.java
  22. 1 1
      jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java
  23. 2 2
      jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanel.java
  24. 2 2
      jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java
  25. 2 2
      jme3-desktop/src/main/java/jme3tools/converters/MipMapGenerator.java
  26. 2 2
      jme3-examples/src/main/java/jme3test/TestChooser.java
  27. 1 1
      jme3-examples/src/main/java/jme3test/app/TestIDList.java
  28. 2 2
      jme3-examples/src/main/java/jme3test/asset/TestAssetCache.java
  29. 3 3
      jme3-examples/src/main/java/jme3test/batching/TestBatchNodeCluster.java
  30. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java
  31. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java
  32. 1 1
      jme3-examples/src/main/java/jme3test/gui/TestCursor.java
  33. 1 1
      jme3-examples/src/main/java/jme3test/helloworld/HelloTerrainCollision.java
  34. 1 1
      jme3-examples/src/main/java/jme3test/input/TestJoystick.java
  35. 1 1
      jme3-examples/src/main/java/jme3test/input/combomoves/ComboMove.java
  36. 2 2
      jme3-examples/src/main/java/jme3test/input/combomoves/TestComboMoves.java
  37. 1 1
      jme3-examples/src/main/java/jme3test/model/anim/TestHWSkinningOld.java
  38. 1 1
      jme3-examples/src/main/java/jme3test/post/TestDepthOfField.java
  39. 2 2
      jme3-examples/src/main/java/jme3test/post/TestFog.java
  40. 1 1
      jme3-examples/src/main/java/jme3test/stress/TestLodGeneration.java
  41. 2 2
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestModifyHeight.java
  42. 2 2
      jme3-examples/src/main/java/jme3test/texture/TestTexture3D.java
  43. 1 1
      jme3-examples/src/main/java/jme3test/texture/TestTextureArray.java
  44. 1 1
      jme3-examples/src/main/java/jme3test/texture/TestTextureArrayCompressed.java
  45. 1 1
      jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java
  46. 1 1
      jme3-examples/src/main/java/jme3test/water/TestPostWater.java
  47. 1 1
      jme3-ios/src/main/java/com/jme3/input/ios/IosInputHandler.java
  48. 2 2
      jme3-ios/src/main/java/com/jme3/input/ios/IosTouchHandler.java
  49. 13 13
      jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java
  50. 2 2
      jme3-jbullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEventFactory.java
  51. 2 2
      jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java
  52. 2 2
      jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/HullCollisionShape.java
  53. 2 2
      jme3-jbullet/src/main/java/com/jme3/bullet/joints/SixDofJoint.java
  54. 2 2
      jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsGhostObject.java
  55. 1 1
      jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java
  56. 2 2
      jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java
  57. 3 3
      jme3-jogg/src/main/java/com/jme3/audio/plugins/CachedOggStream.java
  58. 3 3
      jme3-jogg/src/main/java/com/jme3/audio/plugins/UncachedOggStream.java
  59. 5 5
      jme3-lwjgl/src/main/java/com/jme3/input/lwjgl/JInputJoyInput.java
  60. 2 2
      jme3-lwjgl/src/main/java/com/jme3/input/lwjgl/LwjglMouseInput.java
  61. 6 6
      jme3-networking/src/main/java/com/jme3/network/base/DefaultClient.java
  62. 9 9
      jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.java
  63. 3 3
      jme3-networking/src/main/java/com/jme3/network/base/MessageListenerRegistry.java
  64. 1 1
      jme3-networking/src/main/java/com/jme3/network/base/protocol/GreedyMessageBuffer.java
  65. 1 1
      jme3-networking/src/main/java/com/jme3/network/base/protocol/LazyMessageBuffer.java
  66. 3 3
      jme3-networking/src/main/java/com/jme3/network/kernel/AbstractKernel.java
  67. 2 2
      jme3-networking/src/main/java/com/jme3/network/kernel/tcp/NioEndpoint.java
  68. 3 3
      jme3-networking/src/main/java/com/jme3/network/kernel/tcp/SelectorKernel.java
  69. 2 2
      jme3-networking/src/main/java/com/jme3/network/kernel/udp/UdpKernel.java
  70. 1 1
      jme3-networking/src/main/java/com/jme3/network/message/SerializerRegistrationsMessage.java
  71. 6 6
      jme3-networking/src/main/java/com/jme3/network/rmi/ObjectStore.java
  72. 3 3
      jme3-networking/src/main/java/com/jme3/network/rmi/RemoteObject.java
  73. 4 4
      jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.java
  74. 3 3
      jme3-networking/src/main/java/com/jme3/network/serializing/serializers/FieldSerializer.java
  75. 2 2
      jme3-networking/src/main/java/com/jme3/network/service/ServiceManager.java
  76. 1 1
      jme3-networking/src/main/java/com/jme3/network/service/rmi/ClassInfo.java
  77. 1 1
      jme3-networking/src/main/java/com/jme3/network/service/rmi/ClassInfoRegistry.java
  78. 2 2
      jme3-networking/src/main/java/com/jme3/network/service/rmi/RemoteObjectHandler.java
  79. 2 2
      jme3-networking/src/main/java/com/jme3/network/service/rmi/RmiClientService.java
  80. 2 2
      jme3-networking/src/main/java/com/jme3/network/service/rmi/RmiHostedService.java
  81. 6 6
      jme3-networking/src/main/java/com/jme3/network/service/rmi/RmiRegistry.java
  82. 3 3
      jme3-networking/src/main/java/com/jme3/network/service/rpc/RpcConnection.java
  83. 3 3
      jme3-networking/src/main/java/com/jme3/network/util/AbstractMessageDelegator.java
  84. 2 2
      jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainGrid.java
  85. 9 9
      jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainQuad.java
  86. 1 1
      jme3-terrain/src/main/java/com/jme3/terrain/noise/basis/FilteredBasis.java
  87. 1 1
      jme3-terrain/src/main/java/com/jme3/terrain/noise/basis/Noise.java
  88. 2 2
      jme3-terrain/src/main/java/com/jme3/terrain/noise/filter/AbstractFilter.java
  89. 2 2
      jme3-terrain/src/main/java/com/jme3/terrain/noise/filter/IterativeFilter.java
  90. 2 2
      jme3-vr/src/main/java/com/jme3/app/VRApplication.java
  91. 2 2
      jme3-vr/src/main/java/com/jme3/input/lwjgl/GlfwKeyInputVR.java
  92. 4 4
      jme3-vr/src/main/java/com/jme3/input/lwjgl/GlfwMouseInputVR.java
  93. 2 2
      jme3-vr/src/main/java/com/jme3/shadow/AbstractShadowRendererVR.java

+ 1 - 1
jme3-android-examples/src/main/java/jme3test/android/TestAndroidSensors.java

@@ -38,7 +38,7 @@ public class TestAndroidSensors extends SimpleApplication implements ActionListe
 
     private Geometry geomZero = null;
     // Map of joysticks saved with the joyId as the key
-    private IntMap<Joystick> joystickMap = new IntMap<Joystick>();
+    private IntMap<Joystick> joystickMap = new IntMap<>();
     // flag to allow for the joystick axis to be calibrated on startup
     private boolean initialCalibrationComplete = false;
     // mappings used for onAnalog

+ 3 - 3
jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/CustomArrayAdapter.java

@@ -125,13 +125,13 @@ public class CustomArrayAdapter extends ArrayAdapter<String> {
             String prefix = constraint.toString().toLowerCase();
             Log.i(TAG, "performFiltering: entries size: " + entries.size());
             if (prefix == null || prefix.length() == 0){
-                ArrayList<String> list = new ArrayList<String>(entries);
+                ArrayList<String> list = new ArrayList<>(entries);
                 results.values = list;
                 results.count = list.size();
                 Log.i(TAG, "clearing filter with size: " + list.size());
             }else{
-                final ArrayList<String> list = new ArrayList<String>(entries);
-                final ArrayList<String> nlist = new ArrayList<String>();
+                final ArrayList<String> list = new ArrayList<>(entries);
+                final ArrayList<String> nlist = new ArrayList<>();
                 int count = list.size();
 
                 for (int i = 0; i<count; i++){

+ 2 - 2
jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java

@@ -74,8 +74,8 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen
     /* Fields to contain the current position and display contents of the spinner */
     private int currentPosition = 0;
     private String currentSelection = "";
-    private List<String> classNames = new ArrayList<String>();
-    private List<String> exclusions = new ArrayList<String>();
+    private List<String> classNames = new ArrayList<>();
+    private List<String> exclusions = new ArrayList<>();
     private String rootPackage;
 
     /* ListView that displays the test application class names. */

+ 2 - 2
jme3-android/src/main/java/com/jme3/app/state/MjpegFileWriter.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
@@ -457,7 +457,7 @@ public class MjpegFileWriter {
 
         public byte[] fcc = new byte[]{'i', 'd', 'x', '1'};
         public int cb = 0;
-        public List<AVIIndex> ind = new ArrayList<AVIIndex>();
+        public List<AVIIndex> ind = new ArrayList<>();
 
         public AVIIndexList() {
         }

+ 1 - 1
jme3-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java

@@ -224,7 +224,7 @@ public class VideoRecorderAppState extends AbstractAppState {
         private RenderManager renderManager;
         private boolean isInitilized = false;
         private LinkedBlockingQueue<WorkItem> freeItems;
-        private LinkedBlockingQueue<WorkItem> usedItems = new LinkedBlockingQueue<WorkItem>();
+        private LinkedBlockingQueue<WorkItem> usedItems = new LinkedBlockingQueue<>();
         private MjpegFileWriter writer;
         private boolean fastMode = true;
         private AppProfiler prof;

+ 2 - 2
jme3-android/src/main/java/com/jme3/input/android/AndroidJoyInput.java

@@ -83,14 +83,14 @@ public class AndroidJoyInput implements JoyInput {
     public static boolean disableSensors = false;
 
     protected AndroidInputHandler inputHandler;
-    protected List<Joystick> joystickList = new ArrayList<Joystick>();
+    protected List<Joystick> joystickList = new ArrayList<>();
 //    private boolean dontSendHistory = false;
 
 
     // Internal
     private boolean initialized = false;
     private RawInputListener listener = null;
-    private ConcurrentLinkedQueue<InputEvent> eventQueue = new ConcurrentLinkedQueue<InputEvent>();
+    private ConcurrentLinkedQueue<InputEvent> eventQueue = new ConcurrentLinkedQueue<>();
     private AndroidSensorJoyInput sensorJoyInput;
     private Vibrator vibrator = null;
     private boolean vibratorActive = false;

+ 5 - 5
jme3-android/src/main/java/com/jme3/input/android/AndroidJoystickJoyInput14.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
@@ -65,7 +65,7 @@ public class AndroidJoystickJoyInput14 {
 
     private boolean loaded = false;
     private AndroidJoyInput joyInput;
-    private Map<Integer, AndroidJoystick> joystickIndex = new HashMap<Integer, AndroidJoystick>();
+    private Map<Integer, AndroidJoystick> joystickIndex = new HashMap<>();
 
     private static int[] AndroidGamepadButtons = {
             // Dpad buttons
@@ -109,7 +109,7 @@ public class AndroidJoystickJoyInput14 {
 
     public List<Joystick> loadJoysticks(int joyId, InputManager inputManager) {
         logger.log(Level.INFO, "loading Joystick devices");
-        ArrayList<Joystick> joysticks = new ArrayList<Joystick>();
+        ArrayList<Joystick> joysticks = new ArrayList<>();
         joysticks.clear();
         joystickIndex.clear();
 
@@ -245,8 +245,8 @@ public class AndroidJoystickJoyInput14 {
         private JoystickAxis yAxis;
         private JoystickAxis povX;
         private JoystickAxis povY;
-        private Map<Integer, JoystickAxis> axisIndex = new HashMap<Integer, JoystickAxis>();
-        private Map<Integer, JoystickButton> buttonIndex = new HashMap<Integer, JoystickButton>();
+        private Map<Integer, JoystickAxis> axisIndex = new HashMap<>();
+        private Map<Integer, JoystickButton> buttonIndex = new HashMap<>();
 
         public AndroidJoystick( InputManager inputManager, JoyInput joyInput, InputDevice device,
                                int joyId, String name ) {

+ 3 - 3
jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.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
@@ -78,7 +78,7 @@ public class AndroidSensorJoyInput implements SensorEventListener {
     private AndroidJoyInput joyInput;
     private SensorManager sensorManager = null;
     private WindowManager windowManager = null;
-    private IntMap<SensorData> sensors = new IntMap<SensorData>();
+    private IntMap<SensorData> sensors = new IntMap<>();
     private int lastRotation = 0;
     private boolean loaded = false;
 
@@ -96,7 +96,7 @@ public class AndroidSensorJoyInput implements SensorEventListener {
         int sensorAccuracy = -1;
         float[] lastValues;
         final Object valuesLock = new Object();
-        ArrayList<AndroidSensorJoystickAxis> axes = new ArrayList<AndroidSensorJoystickAxis>();
+        ArrayList<AndroidSensorJoystickAxis> axes = new ArrayList<>();
         boolean enabled = false;
         boolean haveData = false;
 

+ 3 - 3
jme3-android/src/main/java/com/jme3/input/android/AndroidTouchInput.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,8 +72,8 @@ public class AndroidTouchInput implements TouchInput {
     private boolean dontSendHistory = false;
 
     protected int numPointers = 0;
-    final private HashMap<Integer, Vector2f> lastPositions = new HashMap<Integer, Vector2f>();
-    final private ConcurrentLinkedQueue<InputEvent> inputEventQueue = new ConcurrentLinkedQueue<InputEvent>();
+    final private HashMap<Integer, Vector2f> lastPositions = new HashMap<>();
+    final private ConcurrentLinkedQueue<InputEvent> inputEventQueue = new ConcurrentLinkedQueue<>();
     private final static int MAX_TOUCH_EVENTS = 1024;
     private final TouchEventPool touchEventPool = new TouchEventPool(MAX_TOUCH_EVENTS);
     private float scaleX = 1f;

+ 2 - 2
jme3-android/src/main/java/com/jme3/input/android/AndroidTouchInput14.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
@@ -46,7 +46,7 @@ import java.util.logging.Logger;
  */
 public class AndroidTouchInput14 extends AndroidTouchInput {
     private static final Logger logger = Logger.getLogger(AndroidTouchInput14.class.getName());
-    final private HashMap<Integer, Vector2f> lastHoverPositions = new HashMap<Integer, Vector2f>();
+    final private HashMap<Integer, Vector2f> lastHoverPositions = new HashMap<>();
 
     public AndroidTouchInput14(AndroidInputHandler androidInput) {
         super(androidInput);

+ 2 - 2
jme3-bullet/src/common/java/com/jme3/bullet/animation/RagUtils.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2019 jMonkeyEngine
+ * Copyright (c) 2018-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -468,7 +468,7 @@ public class RagUtils {
      */
     private static List<Geometry> listGeometries(Spatial subtree,
             List<Geometry> addResult) {
-        List<Geometry> result = (addResult == null) ? new ArrayList<Geometry>(50) : addResult;
+        List<Geometry> result = (addResult == null) ? new ArrayList<>(50) : addResult;
 
         if (subtree instanceof Geometry) {
             Geometry geometry = (Geometry) subtree;

+ 5 - 5
jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.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
@@ -93,8 +93,8 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
      */
     protected static final Logger logger = Logger.getLogger(KinematicRagdollControl.class.getName());
     protected List<RagdollCollisionListener> listeners;
-    protected final Set<String> boneList = new TreeSet<String>();
-    protected final Map<String, PhysicsBoneLink> boneLinks = new HashMap<String, PhysicsBoneLink>();
+    protected final Set<String> boneList = new TreeSet<>();
+    protected final Map<String, PhysicsBoneLink> boneLinks = new HashMap<>();
     protected final Vector3f modelPosition = new Vector3f();
     protected final Quaternion modelRotation = new Quaternion();
     protected final PhysicsRigidBody baseRigidBody;
@@ -123,8 +123,8 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
      * accumulate total mass of ragdoll when control is added to a scene
      */
     protected float totalMass = 0;
-    private Map<String, Vector3f> ikTargets = new HashMap<String, Vector3f>();
-    private Map<String, Integer> ikChainDepth = new HashMap<String, Integer>();
+    private Map<String, Vector3f> ikTargets = new HashMap<>();
+    private Map<String, Integer> ikChainDepth = new HashMap<>();
     /**
      * rotational speed for inverse kinematics (radians per second, default=7)
      */

+ 3 - 3
jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollPreset.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
@@ -50,11 +50,11 @@ public abstract class RagdollPreset {
     /**
      * map bone names to joint presets
      */
-    protected Map<String, JointPreset> boneMap = new HashMap<String, JointPreset>();
+    protected Map<String, JointPreset> boneMap = new HashMap<>();
     /**
      * lexicon to map bone names to entries
      */
-    protected Map<String, LexiconEntry> lexicon = new HashMap<String, LexiconEntry>();
+    protected Map<String, LexiconEntry> lexicon = new HashMap<>();
 
     /**
      * Initialize the map from bone names to joint presets.

+ 4 - 4
jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollUtils.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
@@ -155,7 +155,7 @@ public class RagdollUtils {
      */
     public static HullCollisionShape makeShapeFromPointMap(Map<Integer, List<Float>> pointsMap, List<Integer> boneIndices, Vector3f initialScale, Vector3f initialPosition) {
 
-        ArrayList<Float> points = new ArrayList<Float>();
+        ArrayList<Float> points = new ArrayList<>();
         for (Integer index : boneIndices) {
             List<Float> l = pointsMap.get(index);
             if (l != null) {
@@ -192,7 +192,7 @@ public class RagdollUtils {
      * @return a new list (not null)
      */
     public static List<Integer> getBoneIndices(Bone bone, Skeleton skeleton, Set<String> boneList) {
-        List<Integer> list = new LinkedList<Integer>();
+        List<Integer> list = new LinkedList<>();
         if (boneList.isEmpty()) {
             list.add(skeleton.getBoneIndex(bone));
         } else {
@@ -265,7 +265,7 @@ public class RagdollUtils {
         boneIndices.rewind();
         boneWeight.rewind();
 
-        ArrayList<Float> results = new ArrayList<Float>();
+        ArrayList<Float> results = new ArrayList<>();
 
         int vertexComponents = mesh.getVertexCount() * 3;
 

+ 6 - 6
jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletDebugAppState.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
@@ -110,23 +110,23 @@ public class BulletDebugAppState extends AbstractAppState {
     /**
      * map rigid bodies to visualizations
      */
-    protected HashMap<PhysicsRigidBody, Spatial> bodies = new HashMap<PhysicsRigidBody, Spatial>();
+    protected HashMap<PhysicsRigidBody, Spatial> bodies = new HashMap<>();
     /**
      * map joints to visualizations
      */
-    protected HashMap<PhysicsJoint, Spatial> joints = new HashMap<PhysicsJoint, Spatial>();
+    protected HashMap<PhysicsJoint, Spatial> joints = new HashMap<>();
     /**
      * map ghosts to visualizations
      */
-    protected HashMap<PhysicsGhostObject, Spatial> ghosts = new HashMap<PhysicsGhostObject, Spatial>();
+    protected HashMap<PhysicsGhostObject, Spatial> ghosts = new HashMap<>();
     /**
      * map physics characters to visualizations
      */
-    protected HashMap<PhysicsCharacter, Spatial> characters = new HashMap<PhysicsCharacter, Spatial>();
+    protected HashMap<PhysicsCharacter, Spatial> characters = new HashMap<>();
     /**
      * map vehicles to visualizations
      */
-    protected HashMap<PhysicsVehicle, Spatial> vehicles = new HashMap<PhysicsVehicle, Spatial>();
+    protected HashMap<PhysicsVehicle, Spatial> vehicles = new HashMap<>();
     /**
      * Instantiate an app state to visualize the specified space. This constructor should be invoked only by
      * BulletAppState.

+ 4 - 4
jme3-desktop/src/main/java/com/jme3/app/SettingsDialog.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
@@ -747,7 +747,7 @@ public final class SettingsDialog extends JFrame {
         heightLimit -= insets.top + insets.bottom;
         widthLimit -= insets.left + insets.right;
         
-        ArrayList<String> resolutions = new ArrayList<String>(modes.length);
+        ArrayList<String> resolutions = new ArrayList<>(modes.length);
         for (int i = 0; i < modes.length; i++) {
             int height = modes[i].getHeight();
             int width = modes[i].getWidth();
@@ -796,7 +796,7 @@ public final class SettingsDialog extends JFrame {
      * Returns every possible bit depth for the given resolution.
      */
     private static String[] getDepths(String resolution, DisplayMode[] modes) {
-        ArrayList<String> depths = new ArrayList<String>(4);
+        ArrayList<String> depths = new ArrayList<>(4);
         for (int i = 0; i < modes.length; i++) {
             // Filter out all bit depths lower than 16 - Java incorrectly
             // reports
@@ -828,7 +828,7 @@ public final class SettingsDialog extends JFrame {
      */
     private static String[] getFrequencies(String resolution,
             DisplayMode[] modes) {
-        ArrayList<String> freqs = new ArrayList<String>(4);
+        ArrayList<String> freqs = new ArrayList<>(4);
         for (int i = 0; i < modes.length; i++) {
             String res = modes[i].getWidth() + " x " + modes[i].getHeight();
             String freq;

+ 2 - 2
jme3-desktop/src/main/java/com/jme3/app/state/MjpegFileWriter.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
@@ -449,7 +449,7 @@ public class MjpegFileWriter {
 
         public byte[] fcc = new byte[]{'i', 'd', 'x', '1'};
         public int cb = 0;
-        public List<AVIIndex> ind = new ArrayList<AVIIndex>();
+        public List<AVIIndex> ind = new ArrayList<>();
 
         public AVIIndexList() {
         }

+ 1 - 1
jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java

@@ -219,7 +219,7 @@ public class VideoRecorderAppState extends AbstractAppState {
         private RenderManager renderManager;
         private boolean isInitilized = false;
         private LinkedBlockingQueue<WorkItem> freeItems;
-        private LinkedBlockingQueue<WorkItem> usedItems = new LinkedBlockingQueue<WorkItem>();
+        private LinkedBlockingQueue<WorkItem> usedItems = new LinkedBlockingQueue<>();
         private MjpegFileWriter writer;
         private AppProfiler prof;
 

+ 1 - 1
jme3-desktop/src/main/java/com/jme3/cursors/plugins/CursorLoader.java

@@ -578,7 +578,7 @@ public class CursorLoader implements AssetLoader {
             // 1 - ICO
             // 2 - CUR
             IntBuffer singleCursor = null;
-            ArrayList<IntBuffer> cursors = new ArrayList<IntBuffer>();
+            ArrayList<IntBuffer> cursors = new ArrayList<>();
             int bwidth = 0;
             int bheight = 0;
             boolean multIcons = false;

+ 2 - 2
jme3-desktop/src/main/java/com/jme3/input/awt/AwtKeyInput.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,7 +53,7 @@ public class AwtKeyInput implements KeyInput, KeyListener {
 
     private static final Logger logger = Logger.getLogger(AwtKeyInput.class.getName());
     
-    private final ArrayList<KeyInputEvent> eventQueue = new ArrayList<KeyInputEvent>();
+    private final ArrayList<KeyInputEvent> eventQueue = new ArrayList<>();
     private RawInputListener listener;
     private Component component;
     private BitSet keyStateSet = new BitSet(0xFF);

+ 3 - 3
jme3-desktop/src/main/java/com/jme3/input/awt/AwtMouseInput.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
@@ -64,8 +64,8 @@ public class AwtMouseInput implements MouseInput, MouseListener, MouseWheelListe
 
     private Component component;
 
-    private final ArrayList<MouseButtonEvent> eventQueue = new ArrayList<MouseButtonEvent>();
-    private final ArrayList<MouseButtonEvent> eventQueueCopy = new ArrayList<MouseButtonEvent>();
+    private final ArrayList<MouseButtonEvent> eventQueue = new ArrayList<>();
+    private final ArrayList<MouseButtonEvent> eventQueueCopy = new ArrayList<>();
 
     private int lastEventX;
     private int lastEventY;

+ 1 - 1
jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java

@@ -369,7 +369,7 @@ public final class NativeLibraryLoader {
     }
     
     public static File[] getJarsWithNatives() {
-        HashSet<File> jarFiles = new HashSet<File>();
+        HashSet<File> jarFiles = new HashSet<>();
         for (Map.Entry<NativeLibrary.Key, NativeLibrary> lib : nativeLibraryMap.entrySet()) {
             File jarFile = getJarForNativeLibrary(lib.getValue().getPlatform(), lib.getValue().getName());
             if (jarFile != null) {

+ 2 - 2
jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanel.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
@@ -66,7 +66,7 @@ public class AwtPanel extends Canvas implements SceneProcessor {
     private IntBuffer intBuf;
     private RenderManager rm;
     private PaintMode paintMode;
-    private ArrayList<ViewPort> viewPorts = new ArrayList<ViewPort>();
+    private ArrayList<ViewPort> viewPorts = new ArrayList<>();
 
     // Visibility/drawing vars
     private BufferStrategy strategy;

+ 2 - 2
jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.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
@@ -47,7 +47,7 @@ public class AwtPanelsContext implements JmeContext {
     protected JmeContext actualContext;
     protected AppSettings settings = new AppSettings(true);
     protected SystemListener listener;
-    protected ArrayList<AwtPanel> panels = new ArrayList<AwtPanel>();
+    protected ArrayList<AwtPanel> panels = new ArrayList<>();
     protected AwtPanel inputSource;
 
     protected AwtMouseInput mouseInput = new AwtMouseInput();

+ 2 - 2
jme3-desktop/src/main/java/jme3tools/converters/MipMapGenerator.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
@@ -85,7 +85,7 @@ public class MipMapGenerator {
 
         BufferedImage current = original;
         AWTLoader loader = new AWTLoader();
-        ArrayList<ByteBuffer> output = new ArrayList<ByteBuffer>();
+        ArrayList<ByteBuffer> output = new ArrayList<>();
         int totalSize = 0;
         Format format = null;
         

+ 2 - 2
jme3-examples/src/main/java/jme3test/TestChooser.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
@@ -461,7 +461,7 @@ public class TestChooser extends JDialog {
     }
 
     protected void start(String[] args) {
-        final Vector<Class> classes = new Vector<Class>();
+        final Vector<Class> classes = new Vector<>();
         logger.fine("Composing Test list...");
         addDisplayedClasses(classes);
         setup(classes);

+ 1 - 1
jme3-examples/src/main/java/jme3test/app/TestIDList.java

@@ -41,7 +41,7 @@ public class TestIDList {
 
         final private static Random rand = new Random();
 
-        final private Map<Integer, Object> objs = new HashMap<Integer, Object>();
+        final private Map<Integer, Object> objs = new HashMap<>();
 
         public StateCol(){
             // populate with free ids

+ 2 - 2
jme3-examples/src/main/java/jme3test/asset/TestAssetCache.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
@@ -124,7 +124,7 @@ public class TestAssetCache {
     
     private static void runTest(boolean cloneAssets, boolean smartCache, boolean keepRefs, int limit) {
         counter = 0;
-        List<Object> refs = new ArrayList<Object>(limit);
+        List<Object> refs = new ArrayList<>(limit);
         
         AssetCache cache;
         AssetProcessor proc = null;

+ 3 - 3
jme3-examples/src/main/java/jme3test/batching/TestBatchNodeCluster.java

@@ -77,9 +77,9 @@ public class TestBatchNodeCluster extends SimpleApplication {
     final private int startAt = 0;
     final private static int xPositions = 0, yPositions = 0, zPositions = 0;
     final private int returner = 0;
-    final private ArrayList<Integer> xPosition = new ArrayList<Integer>();
-    final private ArrayList<Integer> yPosition = new ArrayList<Integer>();
-    final private ArrayList<Integer> zPosition = new ArrayList<Integer>();
+    final private ArrayList<Integer> xPosition = new ArrayList<>();
+    final private ArrayList<Integer> yPosition = new ArrayList<>();
+    final private ArrayList<Integer> zPosition = new ArrayList<>();
     final private int xLimitf = 60, xLimits = -60, yLimitf = 60, yLimits = -20, zLimitf = 60, zLimits = -60;
     final private int circ = 8;//increases by 8 every time.
     final private int dynamic = 4;

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java

@@ -296,7 +296,7 @@ public class TestHoveringTank extends SimpleApplication implements AnalogListene
             e.printStackTrace();
         }
         terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
-        List<Camera> cameras = new ArrayList<Camera>();
+        List<Camera> cameras = new ArrayList<>();
         cameras.add(getCamera());
         TerrainLodControl control = new TerrainLodControl(terrain, cameras);
         terrain.addControl(control);

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java

@@ -275,7 +275,7 @@ public class TestWalkingChar extends SimpleApplication implements ActionListener
         }
 
         terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
-        List<Camera> cameras = new ArrayList<Camera>();
+        List<Camera> cameras = new ArrayList<>();
         cameras.add(getCamera());
         TerrainLodControl control = new TerrainLodControl(terrain, cameras);
         terrain.addControl(control);

+ 1 - 1
jme3-examples/src/main/java/jme3test/gui/TestCursor.java

@@ -14,7 +14,7 @@ import java.util.ArrayList;
  */
 public class TestCursor extends SimpleApplication {
 
-    final private ArrayList<JmeCursor> cursors = new ArrayList<JmeCursor>();
+    final private ArrayList<JmeCursor> cursors = new ArrayList<>();
     private long sysTime;
     private int count = 0;
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/helloworld/HelloTerrainCollision.java

@@ -140,7 +140,7 @@ public class HelloTerrainCollision extends SimpleApplication
     rootNode.attachChild(terrain);
 
     /** 5. The LOD (level of detail) depends on were the camera is: */
-    List<Camera> cameras = new ArrayList<Camera>();
+    List<Camera> cameras = new ArrayList<>();
     cameras.add(getCamera());
     TerrainLodControl control = new TerrainLodControl(terrain, cameras);
     terrain.addControl(control);

+ 1 - 1
jme3-examples/src/main/java/jme3test/input/TestJoystick.java

@@ -219,7 +219,7 @@ public class TestJoystick extends SimpleApplication {
         final private Geometry leftStick;
         final private Geometry rightStick;
             
-        final private Map<String, ButtonView> buttons = new HashMap<String, ButtonView>();
+        final private Map<String, ButtonView> buttons = new HashMap<>();
     
         public GamepadView() {
             super( "gamepad" );

+ 1 - 1
jme3-examples/src/main/java/jme3test/input/combomoves/ComboMove.java

@@ -64,7 +64,7 @@ public class ComboMove {
     }
 
     final private String moveName;
-    final private List<ComboMoveState> states = new ArrayList<ComboMoveState>();
+    final private List<ComboMoveState> states = new ArrayList<>();
     private boolean useFinalState = true;
     private float priority = 1;
     private float castTime = 0.8f;

+ 2 - 2
jme3-examples/src/main/java/jme3test/input/combomoves/TestComboMoves.java

@@ -44,7 +44,7 @@ import java.util.List;
 
 public class TestComboMoves extends SimpleApplication implements ActionListener {
 
-    final private HashSet<String> pressedMappings = new HashSet<String>();
+    final private HashSet<String> pressedMappings = new HashSet<>();
 
     private ComboMove fireball;
     private ComboMoveExecution fireballExec;
@@ -177,7 +177,7 @@ public class TestComboMoves extends SimpleApplication implements ActionListener
         }
 
         // the pressed mappings was changed. update combo executions
-        List<ComboMove> invokedMoves = new ArrayList<ComboMove>();
+        List<ComboMove> invokedMoves = new ArrayList<>();
         if (shurikenExec.updateState(pressedMappings, time)){
             invokedMoves.add(shuriken);
         }

+ 1 - 1
jme3-examples/src/main/java/jme3test/model/anim/TestHWSkinningOld.java

@@ -51,7 +51,7 @@ public class TestHWSkinningOld extends SimpleApplication implements ActionListen
     final private String[] animNames = {"Dodge", "Walk", "pull", "push"};
     private final static int SIZE = 50;
     private boolean hwSkinningEnable = true;
-    final private List<SkeletonControl> skControls = new ArrayList<SkeletonControl>();
+    final private List<SkeletonControl> skControls = new ArrayList<>();
     private BitmapText hwsText;
 
     public static void main(String[] args) {

+ 1 - 1
jme3-examples/src/main/java/jme3test/post/TestDepthOfField.java

@@ -210,7 +210,7 @@ public class TestDepthOfField extends SimpleApplication {
             e.printStackTrace();
         }
         terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
-        List<Camera> cameras = new ArrayList<Camera>();
+        List<Camera> cameras = new ArrayList<>();
         cameras.add(getCamera());
         terrain.setMaterial(matRock);
         terrain.setLocalScale(new Vector3f(5, 5, 5));

+ 2 - 2
jme3-examples/src/main/java/jme3test/post/TestFog.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
@@ -194,7 +194,7 @@ public class TestFog extends SimpleApplication {
             e.printStackTrace();
         }
         TerrainQuad terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
-        List<Camera> cameras = new ArrayList<Camera>();
+        List<Camera> cameras = new ArrayList<>();
         cameras.add(getCamera());
         terrain.setMaterial(matRock);
         terrain.setLocalScale(new Vector3f(5, 5, 5));

+ 1 - 1
jme3-examples/src/main/java/jme3test/stress/TestLodGeneration.java

@@ -62,7 +62,7 @@ public class TestLodGeneration extends SimpleApplication {
     private int lodLevel = 0;
     private Node model;
     private BitmapText hudText;
-    final private List<Geometry> listGeoms = new ArrayList<Geometry>();
+    final private List<Geometry> listGeoms = new ArrayList<>();
     final private ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(5);
     private AnimChannel ch;
 

+ 2 - 2
jme3-examples/src/main/java/jme3test/terrain/TerrainTestModifyHeight.java

@@ -220,8 +220,8 @@ public class TerrainTestModifyHeight extends SimpleApplication {
         float xStepAmount = terrain.getLocalScale().x;
         float zStepAmount = terrain.getLocalScale().z;
         long start = System.currentTimeMillis();
-        List<Vector2f> locs = new ArrayList<Vector2f>();
-        List<Float> heights = new ArrayList<Float>();
+        List<Vector2f> locs = new ArrayList<>();
+        List<Float> heights = new ArrayList<>();
         
         for (int z = -radiusStepsZ; z < radiusStepsZ; z++) {
             for (int x = -radiusStepsX; x < radiusStepsX; x++) {

+ 2 - 2
jme3-examples/src/main/java/jme3test/texture/TestTexture3D.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
@@ -115,7 +115,7 @@ public class TestTexture3D extends SimpleApplication {
          * This method creates a RGB8 texture with the sizes of 10x10x10 pixels.
          */
     private Texture getTexture() throws IOException {
-        ArrayList<ByteBuffer> data = new ArrayList<ByteBuffer>(1);
+        ArrayList<ByteBuffer> data = new ArrayList<>(1);
         ByteBuffer bb = BufferUtils.createByteBuffer(10 * 10 * 10 * 3);//all data must be inside one buffer
         for (int i = 0; i < 10; ++i) {
             for (int j = 0; j < 10 * 10; ++j) {

+ 1 - 1
jme3-examples/src/main/java/jme3test/texture/TestTextureArray.java

@@ -33,7 +33,7 @@ public class TestTextureArray extends SimpleApplication
        
        Texture tex1 = assetManager.loadTexture( "Textures/Terrain/Pond/Pond.jpg");
        Texture tex2 = assetManager.loadTexture("Textures/Terrain/Rock2/rock.jpg");
-       List<Image> images = new ArrayList<Image>();
+       List<Image> images = new ArrayList<>();
        images.add(tex1.getImage());
        images.add(tex2.getImage());
        TextureArray tex3 = new TextureArray(images);

+ 1 - 1
jme3-examples/src/main/java/jme3test/texture/TestTextureArrayCompressed.java

@@ -33,7 +33,7 @@ public class TestTextureArrayCompressed extends SimpleApplication
        
        Texture tex1 = assetManager.loadTexture( "Textures/Terrain/Pond/Pond_dxt5.dds");
        Texture tex2 = assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall_dxt5.dds");
-       List<Image> images = new ArrayList<Image>();
+       List<Image> images = new ArrayList<>();
        images.add(tex1.getImage());
        images.add(tex2.getImage());
        TextureArray tex3 = new TextureArray(images);

+ 1 - 1
jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java

@@ -199,7 +199,7 @@ public class TestMultiPostWater extends SimpleApplication {
             e.printStackTrace();
         }
         terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
-        List<Camera> cameras = new ArrayList<Camera>();
+        List<Camera> cameras = new ArrayList<>();
         cameras.add(getCamera());
         terrain.setMaterial(matRock);
         terrain.setLocalScale(new Vector3f(5, 5, 5));

+ 1 - 1
jme3-examples/src/main/java/jme3test/water/TestPostWater.java

@@ -319,7 +319,7 @@ public class TestPostWater extends SimpleApplication {
             e.printStackTrace();
         }
         terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
-        List<Camera> cameras = new ArrayList<Camera>();
+        List<Camera> cameras = new ArrayList<>();
         cameras.add(getCamera());
         terrain.setMaterial(matRock);
         terrain.setLocalScale(new Vector3f(5, 5, 5));

+ 1 - 1
jme3-ios/src/main/java/com/jme3/input/ios/IosInputHandler.java

@@ -27,7 +27,7 @@ public class IosInputHandler implements TouchInput {
     // Internal
     private boolean initialized = false;
     private RawInputListener listener = null;
-    private ConcurrentLinkedQueue<InputEvent> inputEventQueue = new ConcurrentLinkedQueue<InputEvent>();
+    private ConcurrentLinkedQueue<InputEvent> inputEventQueue = new ConcurrentLinkedQueue<>();
     private final TouchEventPool touchEventPool = new TouchEventPool(MAX_TOUCH_EVENTS);
     private IosTouchHandler touchHandler;
     private float scaleX = 1f;

+ 2 - 2
jme3-ios/src/main/java/com/jme3/input/ios/IosTouchHandler.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
@@ -56,7 +56,7 @@ import java.util.logging.Logger;
 public class IosTouchHandler {
     private static final Logger logger = Logger.getLogger(IosTouchHandler.class.getName());
     
-    final private HashMap<Integer, Vector2f> lastPositions = new HashMap<Integer, Vector2f>();
+    final private HashMap<Integer, Vector2f> lastPositions = new HashMap<>();
 
     protected int numPointers = 1;
     

+ 13 - 13
jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java

@@ -127,7 +127,7 @@ public class PhysicsSpace {
                     return new ConcurrentLinkedQueue<AppTask<?>>();
                 }
             };
-    private ConcurrentLinkedQueue<AppTask<?>> pQueue = new ConcurrentLinkedQueue<AppTask<?>>();
+    private ConcurrentLinkedQueue<AppTask<?>> pQueue = new ConcurrentLinkedQueue<>();
     private static ThreadLocal<PhysicsSpace> physicsSpaceTL = new ThreadLocal<PhysicsSpace>();
     private DiscreteDynamicsWorld dynamicsWorld = null;
     private BroadphaseInterface broadphase;
@@ -135,19 +135,19 @@ public class PhysicsSpace {
     private CollisionDispatcher dispatcher;
     private ConstraintSolver solver;
     private DefaultCollisionConfiguration collisionConfiguration;
-    private Map<PairCachingGhostObject, PhysicsGhostObject> physicsGhostObjects = new ConcurrentHashMap<PairCachingGhostObject, PhysicsGhostObject>();
-    private Map<PairCachingGhostObject, PhysicsCharacter> physicsCharacters = new ConcurrentHashMap<PairCachingGhostObject, PhysicsCharacter>();
-    private Map<RigidBody, PhysicsRigidBody> physicsBodies = new ConcurrentHashMap<RigidBody, PhysicsRigidBody>();
-    private Map<TypedConstraint, PhysicsJoint> physicsJoints = new ConcurrentHashMap<TypedConstraint, PhysicsJoint>();
-    private Map<RaycastVehicle, PhysicsVehicle> physicsVehicles = new ConcurrentHashMap<RaycastVehicle, PhysicsVehicle>();
+    private Map<PairCachingGhostObject, PhysicsGhostObject> physicsGhostObjects = new ConcurrentHashMap<>();
+    private Map<PairCachingGhostObject, PhysicsCharacter> physicsCharacters = new ConcurrentHashMap<>();
+    private Map<RigidBody, PhysicsRigidBody> physicsBodies = new ConcurrentHashMap<>();
+    private Map<TypedConstraint, PhysicsJoint> physicsJoints = new ConcurrentHashMap<>();
+    private Map<RaycastVehicle, PhysicsVehicle> physicsVehicles = new ConcurrentHashMap<>();
     /**
      * map from collision groups to registered group listeners
      */
-    private Map<Integer, PhysicsCollisionGroupListener> collisionGroupListeners = new ConcurrentHashMap<Integer, PhysicsCollisionGroupListener>();
+    private Map<Integer, PhysicsCollisionGroupListener> collisionGroupListeners = new ConcurrentHashMap<>();
     /**
      * queue of registered tick listeners
      */
-    private ConcurrentLinkedQueue<PhysicsTickListener> tickListeners = new ConcurrentLinkedQueue<PhysicsTickListener>();
+    private ConcurrentLinkedQueue<PhysicsTickListener> tickListeners = new ConcurrentLinkedQueue<>();
     /**
      * list of registered collision listeners
      */
@@ -156,7 +156,7 @@ public class PhysicsSpace {
     /**
      * queue of collision events not yet distributed to listeners
      */
-    private ArrayDeque<PhysicsCollisionEvent> collisionEvents = new ArrayDeque<PhysicsCollisionEvent>();
+    private ArrayDeque<PhysicsCollisionEvent> collisionEvents = new ArrayDeque<>();
     private PhysicsCollisionEventFactory eventFactory = new PhysicsCollisionEventFactory();
     /**
      * copy of minimum coordinate values when using AXIS_SWEEP broadphase
@@ -405,7 +405,7 @@ public class PhysicsSpace {
     }
 
     public static <V> Future<V> enqueueOnThisThread(Callable<V> callable) {
-        AppTask<V> task = new AppTask<V>(callable);
+        AppTask<V> task = new AppTask<>(callable);
         System.out.println("created apptask");
         pQueueTL.get().add(task);
         return task;
@@ -418,7 +418,7 @@ public class PhysicsSpace {
      * @return a new AppTask
      */
     public <V> Future<V> enqueue(Callable<V> callable) {
-        AppTask<V> task = new AppTask<V>(callable);
+        AppTask<V> task = new AppTask<>(callable);
         pQueue.add(task);
         return task;
     }
@@ -760,7 +760,7 @@ public class PhysicsSpace {
      * Performs a ray collision test and returns the results as a list of PhysicsRayTestResults
      */
     public List<PhysicsRayTestResult> rayTest(Vector3f from, Vector3f to) {
-        List<PhysicsRayTestResult> results = new LinkedList<PhysicsRayTestResult>();
+        List<PhysicsRayTestResult> results = new LinkedList<>();
         dynamicsWorld.rayTest(Converter.convert(from, rayVec1), Converter.convert(to, rayVec2), new InternalRayListener(results));
         return results;
     }
@@ -796,7 +796,7 @@ public class PhysicsSpace {
      * SweepTest will not see a collision if it starts INSIDE an object and is moving AWAY from its center.
      */
     public List<PhysicsSweepTestResult> sweepTest(CollisionShape shape, Transform start, Transform end) {
-        List<PhysicsSweepTestResult> results = new LinkedList<PhysicsSweepTestResult>();
+        List<PhysicsSweepTestResult> results = new LinkedList<>();
         if (!(shape.getCShape() instanceof ConvexShape)) {
             logger.log(Level.WARNING, "Trying to sweep test with incompatible mesh shape!");
             return results;

+ 2 - 2
jme3-jbullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEventFactory.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
@@ -40,7 +40,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
  */
 public class PhysicsCollisionEventFactory {
 
-    private ConcurrentLinkedQueue<PhysicsCollisionEvent> eventBuffer = new ConcurrentLinkedQueue<PhysicsCollisionEvent>();
+    private ConcurrentLinkedQueue<PhysicsCollisionEvent> eventBuffer = new ConcurrentLinkedQueue<>();
 
     public PhysicsCollisionEvent getEvent(int type, PhysicsCollisionObject source, PhysicsCollisionObject nodeB, ManifoldPoint cp) {
         PhysicsCollisionEvent event = eventBuffer.poll();

+ 2 - 2
jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.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
@@ -55,7 +55,7 @@ import java.util.logging.Logger;
  */
 public class CompoundCollisionShape extends CollisionShape {
 
-    protected ArrayList<ChildCollisionShape> children = new ArrayList<ChildCollisionShape>();
+    protected ArrayList<ChildCollisionShape> children = new ArrayList<>();
 
     public CompoundCollisionShape() {
         cShape = new CompoundShape();

+ 2 - 2
jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/HullCollisionShape.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
@@ -86,7 +86,7 @@ public class HullCollisionShape extends CollisionShape {
     }
 
     protected void createShape(float[] points) {
-        ObjectArrayList<Vector3f> pointList = new ObjectArrayList<Vector3f>();
+        ObjectArrayList<Vector3f> pointList = new ObjectArrayList<>();
         for (int i = 0; i < points.length; i += 3) {
             pointList.add(new Vector3f(points[i], points[i + 1], points[i + 2]));
         }

+ 2 - 2
jme3-jbullet/src/main/java/com/jme3/bullet/joints/SixDofJoint.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
@@ -61,7 +61,7 @@ import java.util.LinkedList;
 public class SixDofJoint extends PhysicsJoint {
 
     private boolean useLinearReferenceFrameA = true;
-    private LinkedList<RotationalLimitMotor> rotationalMotors = new LinkedList<RotationalLimitMotor>();
+    private LinkedList<RotationalLimitMotor> rotationalMotors = new LinkedList<>();
     private TranslationalLimitMotor translationalMotor;
     private Vector3f angularUpperLimit = new Vector3f(Vector3f.POSITIVE_INFINITY);
     private Vector3f angularLowerLimit = new Vector3f(Vector3f.NEGATIVE_INFINITY);

+ 2 - 2
jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsGhostObject.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
@@ -66,7 +66,7 @@ public class PhysicsGhostObject extends PhysicsCollisionObject {
     protected Transform tempTrans = new Transform(Converter.convert(new Matrix3f()));
     private com.jme3.math.Transform physicsLocation = new com.jme3.math.Transform();
     protected javax.vecmath.Quat4f tempRot = new javax.vecmath.Quat4f();
-    private List<PhysicsCollisionObject> overlappingObjects = new LinkedList<PhysicsCollisionObject>();
+    private List<PhysicsCollisionObject> overlappingObjects = new LinkedList<>();
 
     protected PhysicsGhostObject() {
     }

+ 1 - 1
jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java

@@ -70,7 +70,7 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
     protected javax.vecmath.Matrix3f tempMatrix = new javax.vecmath.Matrix3f();
     //TEMP VARIABLES
     protected javax.vecmath.Vector3f localInertia = new javax.vecmath.Vector3f();
-    protected ArrayList<PhysicsJoint> joints = new ArrayList<PhysicsJoint>();
+    protected ArrayList<PhysicsJoint> joints = new ArrayList<>();
 
     protected PhysicsRigidBody() {
     }

+ 2 - 2
jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.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,7 +64,7 @@ public class PhysicsVehicle extends PhysicsRigidBody {
     protected RaycastVehicle vehicle;
     protected VehicleTuning tuning;
     protected VehicleRaycaster rayCaster;
-    protected ArrayList<VehicleWheel> wheels = new ArrayList<VehicleWheel>();
+    protected ArrayList<VehicleWheel> wheels = new ArrayList<>();
     protected PhysicsSpace physicsSpace;
 
     protected PhysicsVehicle() {

+ 3 - 3
jme3-jogg/src/main/java/com/jme3/audio/plugins/CachedOggStream.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
@@ -56,9 +56,9 @@ public class CachedOggStream implements PhysicalOggStream {
     private boolean bos = false;
     private InputStream sourceStream;
     private HashMap<Integer, LogicalOggStream> logicalStreams 
-            = new HashMap<Integer, LogicalOggStream>();
+            = new HashMap<>();
     
-    private IntMap<OggPage> oggPages = new IntMap<OggPage>();
+    private IntMap<OggPage> oggPages = new IntMap<>();
     private OggPage lastPage;
    
     private int pageNumber;

+ 3 - 3
jme3-jogg/src/main/java/com/jme3/audio/plugins/UncachedOggStream.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
@@ -48,9 +48,9 @@ public class UncachedOggStream implements PhysicalOggStream {
     private boolean eos = false;
     private boolean bos = false;
     private InputStream sourceStream;
-    private LinkedList<OggPage> pageCache = new LinkedList<OggPage>();
+    private LinkedList<OggPage> pageCache = new LinkedList<>();
     private HashMap<Integer, LogicalOggStream> logicalStreams 
-            = new HashMap<Integer, LogicalOggStream>();
+            = new HashMap<>();
     private OggPage lastPage = null;
 
     public UncachedOggStream(InputStream in) throws OggFormatException, IOException {

+ 5 - 5
jme3-lwjgl/src/main/java/com/jme3/input/lwjgl/JInputJoyInput.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
@@ -64,7 +64,7 @@ public class JInputJoyInput implements JoyInput {
     private JInputJoystick[] joysticks;
     private RawInputListener listener;
 
-    private Map<Controller, JInputJoystick> joystickIndex = new HashMap<Controller, JInputJoystick>();
+    private Map<Controller, JInputJoystick> joystickIndex = new HashMap<>();
     
     @Override
     public void setJoyRumble(int joyId, float amount){
@@ -85,7 +85,7 @@ public class JInputJoyInput implements JoyInput {
 
         Controller[] cs = ce.getControllers();
         
-        List<Joystick> list = new ArrayList<Joystick>();
+        List<Joystick> list = new ArrayList<>();
         for( Controller c : ce.getControllers() ) {
             if (c.getType() == Controller.Type.KEYBOARD
              || c.getType() == Controller.Type.MOUSE)
@@ -214,8 +214,8 @@ public class JInputJoyInput implements JoyInput {
         private JoystickAxis yAxis;
         private JoystickAxis povX;
         private JoystickAxis povY;
-        private Map<Component, JoystickAxis> axisIndex = new HashMap<Component, JoystickAxis>();
-        private Map<Component, JoystickButton> buttonIndex = new HashMap<Component, JoystickButton>();
+        private Map<Component, JoystickAxis> axisIndex = new HashMap<>();
+        private Map<Component, JoystickButton> buttonIndex = new HashMap<>();
     
         public JInputJoystick( InputManager inputManager, JoyInput joyInput, Controller controller, 
                                int joyId, String name ) {

+ 2 - 2
jme3-lwjgl/src/main/java/com/jme3/input/lwjgl/LwjglMouseInput.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,7 +63,7 @@ public class LwjglMouseInput implements MouseInput {
      * We need to cache the cursors
      * (https://github.com/jMonkeyEngine/jmonkeyengine/issues/537)
      */
-    private Map<JmeCursor, Cursor> cursorMap = new HashMap<JmeCursor, Cursor>();
+    private Map<JmeCursor, Cursor> cursorMap = new HashMap<>();
 
     private int curX, curY, curWheel;
 

+ 6 - 6
jme3-networking/src/main/java/com/jme3/network/base/DefaultClient.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
@@ -68,18 +68,18 @@ public class DefaultClient implements Client
     private static final int CH_UNRELIABLE = 1;
     private static final int CH_FIRST = 2;
         
-    private final ThreadLocal<ByteBuffer> dataBuffer = new ThreadLocal<ByteBuffer>();
+    private final ThreadLocal<ByteBuffer> dataBuffer = new ThreadLocal<>();
     
     private int id = -1;
     private boolean isRunning = false;
     private final CountDownLatch connecting = new CountDownLatch(1);
     private String gameName;
     private int version;
-    private final MessageListenerRegistry<Client> messageListeners = new MessageListenerRegistry<Client>();
-    private final List<ClientStateListener> stateListeners = new CopyOnWriteArrayList<ClientStateListener>();
-    private final List<ErrorListener<? super Client>> errorListeners = new CopyOnWriteArrayList<ErrorListener<? super Client>>();
+    private final MessageListenerRegistry<Client> messageListeners = new MessageListenerRegistry<>();
+    private final List<ClientStateListener> stateListeners = new CopyOnWriteArrayList<>();
+    private final List<ErrorListener<? super Client>> errorListeners = new CopyOnWriteArrayList<>();
     private final Redispatch dispatcher = new Redispatch();
-    private final List<ConnectorAdapter> channels = new ArrayList<ConnectorAdapter>();    
+    private final List<ConnectorAdapter> channels = new ArrayList<>();    
  
     private ConnectorFactory connectorFactory;
     

+ 9 - 9
jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.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
@@ -73,20 +73,20 @@ public class DefaultServer implements Server
     private final KernelFactory kernelFactory = KernelFactory.DEFAULT;
     private KernelAdapter reliableAdapter;
     private KernelAdapter fastAdapter;
-    private final List<KernelAdapter> channels = new ArrayList<KernelAdapter>();
-    private final List<Integer> alternatePorts = new ArrayList<Integer>();
+    private final List<KernelAdapter> channels = new ArrayList<>();
+    private final List<Integer> alternatePorts = new ArrayList<>();
     private final Redispatch dispatcher = new Redispatch();
-    private final Map<Integer,HostedConnection> connections = new ConcurrentHashMap<Integer,HostedConnection>();
+    private final Map<Integer,HostedConnection> connections = new ConcurrentHashMap<>();
     private final Map<Endpoint,HostedConnection> endpointConnections 
-                            = new ConcurrentHashMap<Endpoint,HostedConnection>();
+                            = new ConcurrentHashMap<>();
     
     // Keeps track of clients for whom we've only received the UDP
     // registration message
-    private final Map<Long,Connection> connecting = new ConcurrentHashMap<Long,Connection>();
+    private final Map<Long,Connection> connecting = new ConcurrentHashMap<>();
     
     private final MessageListenerRegistry<HostedConnection> messageListeners 
-                            = new MessageListenerRegistry<HostedConnection>();                        
-    private final List<ConnectionListener> connectionListeners = new CopyOnWriteArrayList<ConnectionListener>();
+                            = new MessageListenerRegistry<>();                        
+    private final List<ConnectionListener> connectionListeners = new CopyOnWriteArrayList<>();
     
     private HostedServiceManager services;
     private MessageProtocol protocol = new SerializerMessageProtocol();
@@ -523,7 +523,7 @@ public class DefaultServer implements Server
         private Endpoint[] channels;
         private int setChannelCount = 0; 
        
-        private final Map<String,Object> sessionData = new ConcurrentHashMap<String,Object>();       
+        private final Map<String,Object> sessionData = new ConcurrentHashMap<>();       
         
         public Connection( int channelCount )
         {

+ 3 - 3
jme3-networking/src/main/java/com/jme3/network/base/MessageListenerRegistry.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
@@ -52,9 +52,9 @@ public class MessageListenerRegistry<S> implements MessageListener<S>
 {
     static final Logger log = Logger.getLogger(MessageListenerRegistry.class.getName());
     
-    private final List<MessageListener<? super S>> listeners = new CopyOnWriteArrayList<MessageListener<? super S>>();
+    private final List<MessageListener<? super S>> listeners = new CopyOnWriteArrayList<>();
     private final Map<Class,List<MessageListener<? super S>>> typeListeners 
-                    = new ConcurrentHashMap<Class,List<MessageListener<? super S>>>(); 
+                    = new ConcurrentHashMap<>(); 
 
     public MessageListenerRegistry()
     {

+ 1 - 1
jme3-networking/src/main/java/com/jme3/network/base/protocol/GreedyMessageBuffer.java

@@ -55,7 +55,7 @@ import com.jme3.network.base.MessageProtocol;
 public class GreedyMessageBuffer implements MessageBuffer {
 
     private MessageProtocol protocol;
-    private final LinkedList<Message> messages = new LinkedList<Message>();
+    private final LinkedList<Message> messages = new LinkedList<>();
     private ByteBuffer current;
     private int size;
     private Byte carry;

+ 1 - 1
jme3-networking/src/main/java/com/jme3/network/base/protocol/LazyMessageBuffer.java

@@ -52,7 +52,7 @@ import com.jme3.network.base.MessageProtocol;
 public class LazyMessageBuffer implements MessageBuffer {
 
     private MessageProtocol protocol;
-    private final LinkedList<ByteBuffer> messages = new LinkedList<ByteBuffer>();
+    private final LinkedList<ByteBuffer> messages = new LinkedList<>();
     private ByteBuffer current;
     private int size;
     private Byte carry;

+ 3 - 3
jme3-networking/src/main/java/com/jme3/network/kernel/AbstractKernel.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
@@ -57,13 +57,13 @@ public abstract class AbstractKernel implements Kernel
      *  Contains the pending endpoint events waiting for the caller
      *  to retrieve them.
      */
-    private ConcurrentLinkedQueue<EndpointEvent> endpointEvents = new ConcurrentLinkedQueue<EndpointEvent>();
+    private ConcurrentLinkedQueue<EndpointEvent> endpointEvents = new ConcurrentLinkedQueue<>();
 
     /**
      *  Contains the pending envelopes waiting for the caller to
      *  retrieve them.
      */
-    private LinkedBlockingQueue<Envelope> envelopes = new LinkedBlockingQueue<Envelope>();
+    private LinkedBlockingQueue<Envelope> envelopes = new LinkedBlockingQueue<>();
 
     protected AbstractKernel()
     {

+ 2 - 2
jme3-networking/src/main/java/com/jme3/network/kernel/tcp/NioEndpoint.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
@@ -55,7 +55,7 @@ public class NioEndpoint implements Endpoint
     private long id;
     private SocketChannel socket;
     private SelectorKernel kernel;
-    private ConcurrentLinkedQueue<ByteBuffer> outbound = new ConcurrentLinkedQueue<ByteBuffer>();
+    private ConcurrentLinkedQueue<ByteBuffer> outbound = new ConcurrentLinkedQueue<>();
     private boolean closing = false;
 
     public NioEndpoint( SelectorKernel kernel, long id, SocketChannel socket )

+ 3 - 3
jme3-networking/src/main/java/com/jme3/network/kernel/tcp/SelectorKernel.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,7 +61,7 @@ public class SelectorKernel extends AbstractKernel
     private InetSocketAddress address;
     private SelectorThread thread;
 
-    private Map<Long,NioEndpoint> endpoints = new ConcurrentHashMap<Long,NioEndpoint>();
+    private Map<Long,NioEndpoint> endpoints = new ConcurrentHashMap<>();
 
     public SelectorKernel( InetAddress host, int port )
     {
@@ -227,7 +227,7 @@ public class SelectorKernel extends AbstractKernel
          *  Because we want to keep the keys to ourselves, we'll do
          *  the endpoint -&gt; key mapping internally.
          */
-        private Map<NioEndpoint,SelectionKey> endpointKeys = new ConcurrentHashMap<NioEndpoint,SelectionKey>();
+        private Map<NioEndpoint,SelectionKey> endpointKeys = new ConcurrentHashMap<>();
 
         public SelectorThread()
         {

+ 2 - 2
jme3-networking/src/main/java/com/jme3/network/kernel/udp/UdpKernel.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
@@ -62,7 +62,7 @@ public class UdpKernel extends AbstractKernel
     // The nature of UDP means that even through a firewall,
     // a user would have to have a unique address+port since UDP
     // can't really be NAT'ed.
-    private Map<SocketAddress,UdpEndpoint> socketEndpoints = new ConcurrentHashMap<SocketAddress,UdpEndpoint>();
+    private Map<SocketAddress,UdpEndpoint> socketEndpoints = new ConcurrentHashMap<>();
 
     public UdpKernel( InetAddress host, int port )
     {

+ 1 - 1
jme3-networking/src/main/java/com/jme3/network/message/SerializerRegistrationsMessage.java

@@ -108,7 +108,7 @@ public class SerializerRegistrationsMessage extends AbstractMessage {
     public static void compile() {
     
         // Let's just see what they are here
-        List<Registration> list = new ArrayList<Registration>();
+        List<Registration> list = new ArrayList<>();
         for( SerializerRegistration reg : Serializer.getSerializerRegistrations() ) {
             Class type = reg.getType();
             if( ignore.contains(type) )

+ 6 - 6
jme3-networking/src/main/java/com/jme3/network/rmi/ObjectStore.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
@@ -73,14 +73,14 @@ public class ObjectStore {
     private volatile short invocationIdCounter = 0;
 
     // Invocations waiting ..
-    private IntMap<Invocation> pendingInvocations = new IntMap<Invocation>();
+    private IntMap<Invocation> pendingInvocations = new IntMap<>();
     
     // Objects I share with other people
-    private IntMap<LocalObject> localObjects = new IntMap<LocalObject>();
+    private IntMap<LocalObject> localObjects = new IntMap<>();
 
     // Objects others share with me
-    private HashMap<String, RemoteObject> remoteObjects = new HashMap<String, RemoteObject>();
-    private IntMap<RemoteObject> remoteObjectsById = new IntMap<RemoteObject>();
+    private HashMap<String, RemoteObject> remoteObjects = new HashMap<>();
+    private IntMap<RemoteObject> remoteObjectsById = new IntMap<>();
 
     private final Object receiveObjectLock = new Object();
 
@@ -164,7 +164,7 @@ public class ObjectStore {
         localObj.theObject = obj;
         //localObj.methods   = obj.getClass().getMethods();
         
-        ArrayList<Method> methodList = new ArrayList<Method>();
+        ArrayList<Method> methodList = new ArrayList<>();
         for (Method method : obj.getClass().getMethods()){
             if (method.getDeclaringClass() == obj.getClass()){
                 methodList.add(method);

+ 3 - 3
jme3-networking/src/main/java/com/jme3/network/rmi/RemoteObject.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
@@ -59,7 +59,7 @@ public class RemoteObject implements InvocationHandler {
      * Maps from methods locally retrieved from the RMI interface to
      * a method ID.
      */
-    HashMap<Method, Integer> methodMap = new HashMap<Method, Integer>();
+    HashMap<Method, Integer> methodMap = new HashMap<>();
 
     /**
      * The {@link ObjectStore} which stores this RMI interface.
@@ -100,7 +100,7 @@ public class RemoteObject implements InvocationHandler {
      */
     public void loadMethods(Class<?> interfaceClass){
         HashMap<String, ArrayList<Method>> nameToMethods
-                = new HashMap<String, ArrayList<Method>>();
+                = new HashMap<>();
 
         for (Method method : interfaceClass.getDeclaredMethods()){
             ArrayList<Method> list = nameToMethods.get(method.getName());

+ 4 - 4
jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.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
@@ -266,12 +266,12 @@ public abstract class Serializer {
             ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
             String path = pkgName.replace('.', '/');
             Enumeration<URL> resources = classLoader.getResources(path);
-            List<File> dirs = new ArrayList<File>();
+            List<File> dirs = new ArrayList<>();
             while (resources.hasMoreElements()) {
                 URL resource = resources.nextElement();
                 dirs.add(new File(resource.getFile()));
             }
-            ArrayList<Class> classes = new ArrayList<Class>();
+            ArrayList<Class> classes = new ArrayList<>();
             for (File directory : dirs) {
                 classes.addAll(findClasses(directory, pkgName));
             }
@@ -289,7 +289,7 @@ public abstract class Serializer {
     }
 
     private static List<Class> findClasses(File dir, String pkgName) throws ClassNotFoundException {
-        List<Class> classes = new ArrayList<Class>();
+        List<Class> classes = new ArrayList<>();
         if (!dir.exists()) {
             return classes;
         }

+ 3 - 3
jme3-networking/src/main/java/com/jme3/network/serializing/serializers/FieldSerializer.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine, Java Game Networking
+ * Copyright (c) 2009-2021 jMonkeyEngine, Java Game Networking
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -86,7 +86,7 @@ public class FieldSerializer extends Serializer {
 
         checkClass(clazz);   
     
-        List<Field> fields = new ArrayList<Field>();
+        List<Field> fields = new ArrayList<>();
 
         Class processingClass = clazz;
         while (processingClass != Object.class ) {
@@ -94,7 +94,7 @@ public class FieldSerializer extends Serializer {
             processingClass = processingClass.getSuperclass();
         }
 
-        List<SavedField> cachedFields = new ArrayList<SavedField>(fields.size());
+        List<SavedField> cachedFields = new ArrayList<>(fields.size());
         for (Field field : fields) {
             int modifiers = field.getModifiers();
             if (Modifier.isTransient(modifiers)) continue;

+ 2 - 2
jme3-networking/src/main/java/com/jme3/network/service/ServiceManager.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2019 jMonkeyEngine
+ * Copyright (c) 2015-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@ public abstract class ServiceManager<T> {
 
     static final Logger log = Logger.getLogger(ServiceManager.class.getName());
     
-    private final List<Service<T>> services = new CopyOnWriteArrayList<Service<T>>();
+    private final List<Service<T>> services = new CopyOnWriteArrayList<>();
     private volatile boolean started = false;
     
     protected ServiceManager() {

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

@@ -92,7 +92,7 @@ public final class ClassInfo {
     }
     
     private MethodInfo[] toMethodInfo( Class type, Method[] methods ) {
-        List<MethodInfo> result = new ArrayList<MethodInfo>();
+        List<MethodInfo> result = new ArrayList<>();
         short methodId = 0;
         for( Method m : methods ) {
             // Simple... add all methods exposed through the interface

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

@@ -48,7 +48,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
 public class ClassInfoRegistry {
  
     //private final LoadingCache<Class, ClassInfo> cache;  // Guava version
-    private final Map<Class, ClassInfo> cache = new HashMap<Class, ClassInfo>();
+    private final Map<Class, ClassInfo> cache = new HashMap<>();
     private final AtomicInteger nextClassId = new AtomicInteger();
     private final ReadWriteLock lock = new ReentrantReadWriteLock();
  

+ 2 - 2
jme3-networking/src/main/java/com/jme3/network/service/rmi/RemoteObjectHandler.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
@@ -49,7 +49,7 @@ public class RemoteObjectHandler implements InvocationHandler {
     private final byte channel;
     private final short objectId;
     private final ClassInfo typeInfo;
-    private final Map<Method, MethodInfo> methodIndex = new ConcurrentHashMap<Method, MethodInfo>();
+    private final Map<Method, MethodInfo> methodIndex = new ConcurrentHashMap<>();
 
     public RemoteObjectHandler( RmiRegistry rmi, byte channel, short objectId, ClassInfo typeInfo ) {
         this.rmi = rmi;

+ 2 - 2
jme3-networking/src/main/java/com/jme3/network/service/rmi/RmiClientService.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
@@ -69,7 +69,7 @@ public class RmiClientService extends AbstractClientService {
     private RmiRegistry rmi;
     private volatile boolean isStarted = false;
     
-    private final List<ObjectInfo> pending = new ArrayList<ObjectInfo>();   
+    private final List<ObjectInfo> pending = new ArrayList<>();   
     
     public RmiClientService() {
         this((short)-1, (byte)MessageConnection.CHANNEL_DEFAULT_RELIABLE);

+ 2 - 2
jme3-networking/src/main/java/com/jme3/network/service/rmi/RmiHostedService.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2018 jMonkeyEngine
+ * Copyright (c) 2015-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ public class RmiHostedService extends AbstractHostedService {
     private short rmiId;
     private byte defaultChannel;
     private boolean autoHost;
-    private final Map<String, GlobalShare> globalShares = new ConcurrentHashMap<String, GlobalShare>();
+    private final Map<String, GlobalShare> globalShares = new ConcurrentHashMap<>();
 
     public RmiHostedService() {
         this((short)-1, (byte)MessageConnection.CHANNEL_DEFAULT_RELIABLE, true);

+ 6 - 6
jme3-networking/src/main/java/com/jme3/network/service/rmi/RmiRegistry.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
@@ -68,8 +68,8 @@ public class RmiRegistry {
     private final ClassInfoRegistry classCache = new ClassInfoRegistry();
     private final AtomicInteger nextObjectId = new AtomicInteger();
     
-    private final ObjectIndex<SharedObject> local = new ObjectIndex<SharedObject>();
-    private final ObjectIndex<Object> remote = new ObjectIndex<Object>();
+    private final ObjectIndex<SharedObject> local = new ObjectIndex<>();
+    private final ObjectIndex<Object> remote = new ObjectIndex<>();
 
     // Only used on the server to provide thread-local context for
     // local RMI calls.
@@ -378,9 +378,9 @@ public class RmiRegistry {
      *  the remote objects and a lock that can guard them.
      */
     private class ObjectIndex<T> {
-        final Map<String, T> byName = new HashMap<String, T>();
-        final Map<Short, T> byId = new HashMap<Short, T>(); 
-        final Map<Short, ClassInfo> classes = new HashMap<Short, ClassInfo>();  
+        final Map<String, T> byName = new HashMap<>();
+        final Map<Short, T> byId = new HashMap<>(); 
+        final Map<Short, ClassInfo> classes = new HashMap<>();  
         final ReadWriteLock lock = new ReentrantReadWriteLock();
         
         public ObjectIndex() {

+ 3 - 3
jme3-networking/src/main/java/com/jme3/network/service/rpc/RpcConnection.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
@@ -64,7 +64,7 @@ public class RpcConnection {
      *  The objectId index of RpcHandler objects that are used to perform the
      *  RPC calls for a particular object.
      */
-    private Map<Short, RpcHandler> handlers = new ConcurrentHashMap<Short, RpcHandler>();
+    private Map<Short, RpcHandler> handlers = new ConcurrentHashMap<>();
     
     /**
      *  Provides unique messages IDs for outbound synchronous call
@@ -78,7 +78,7 @@ public class RpcConnection {
      *  response is received, the appropriate handler is found here and the
      *  response or error set, thus releasing the waiting caller.
      */ 
-    private Map<Long, ResponseHolder> responses = new ConcurrentHashMap<Long, ResponseHolder>(); 
+    private Map<Long, ResponseHolder> responses = new ConcurrentHashMap<>(); 
  
     /**
      *  Creates a new RpcConnection for the specified network connection.

+ 3 - 3
jme3-networking/src/main/java/com/jme3/network/util/AbstractMessageDelegator.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2019 jMonkeyEngine
+ * Copyright (c) 2015-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,7 @@ public abstract class AbstractMessageDelegator<S extends MessageConnection>
     static final Logger log = Logger.getLogger(AbstractMessageDelegator.class.getName());                                
                                 
     private Class delegateType;
-    private Map<Class, Method> methods = new HashMap<Class, Method>();
+    private Map<Class, Method> methods = new HashMap<>();
     private Class[] messageTypes;
  
     /**
@@ -190,7 +190,7 @@ public abstract class AbstractMessageDelegator<S extends MessageConnection>
      *  the parameters.
      */
     public AbstractMessageDelegator<S> map( String... methodNames ) {
-        Set<String> names = new HashSet<String>( Arrays.asList(methodNames) );
+        Set<String> names = new HashSet<>( Arrays.asList(methodNames) );
         map(names);
         return this;
     }

+ 2 - 2
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainGrid.java

@@ -114,10 +114,10 @@ public class TerrainGrid extends TerrainQuad {
     protected int quadSize;
     private TerrainGridTileLoader gridTileLoader;
     protected Vector3f[] quadIndex;
-    protected Set<TerrainGridListener> listeners = new HashSet<TerrainGridListener>();
+    protected Set<TerrainGridListener> listeners = new HashSet<>();
     protected Material material;
     //cache  needs to be 1 row (4 cells) larger than what we care is cached
-    protected LRUCache<Vector3f, TerrainQuad> cache = new LRUCache<Vector3f, TerrainQuad>(20);
+    protected LRUCache<Vector3f, TerrainQuad> cache = new LRUCache<>(20);
     protected int cellsLoaded = 0;
     protected int[] gridOffset;
     protected boolean runOnce = false;

+ 9 - 9
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainQuad.java

@@ -1116,9 +1116,9 @@ public class TerrainQuad extends Node implements Terrain {
 
     @Override
     public void setHeight(Vector2f xz, float height) {
-        List<Vector2f> coord = new ArrayList<Vector2f>();
+        List<Vector2f> coord = new ArrayList<>();
         coord.add(xz);
-        List<Float> h = new ArrayList<Float>();
+        List<Float> h = new ArrayList<>();
         h.add(height);
 
         setHeight(coord, h);
@@ -1126,9 +1126,9 @@ public class TerrainQuad extends Node implements Terrain {
 
     @Override
     public void adjustHeight(Vector2f xz, float delta) {
-        List<Vector2f> coord = new ArrayList<Vector2f>();
+        List<Vector2f> coord = new ArrayList<>();
         coord.add(xz);
-        List<Float> h = new ArrayList<Float>();
+        List<Float> h = new ArrayList<>();
         h.add(delta);
 
         adjustHeight(coord, h);
@@ -1150,7 +1150,7 @@ public class TerrainQuad extends Node implements Terrain {
 
         int halfSize = totalSize / 2;
 
-        List<LocationHeight> locations = new ArrayList<LocationHeight>();
+        List<LocationHeight> locations = new ArrayList<>();
 
         // offset
         for (int i=0; i<xz.size(); i++) {
@@ -1186,10 +1186,10 @@ public class TerrainQuad extends Node implements Terrain {
         if (children == null)
             return;
 
-        List<LocationHeight> quadLH1 = new ArrayList<LocationHeight>();
-        List<LocationHeight> quadLH2 = new ArrayList<LocationHeight>();
-        List<LocationHeight> quadLH3 = new ArrayList<LocationHeight>();
-        List<LocationHeight> quadLH4 = new ArrayList<LocationHeight>();
+        List<LocationHeight> quadLH1 = new ArrayList<>();
+        List<LocationHeight> quadLH2 = new ArrayList<>();
+        List<LocationHeight> quadLH3 = new ArrayList<>();
+        List<LocationHeight> quadLH4 = new ArrayList<>();
         Spatial quad1 = null;
         Spatial quad2 = null;
         Spatial quad3 = null;

+ 1 - 1
jme3-terrain/src/main/java/com/jme3/terrain/noise/basis/FilteredBasis.java

@@ -39,7 +39,7 @@ import java.util.List;
 public class FilteredBasis extends AbstractFilter implements Basis {
 
 	private Basis basis;
-	private List<Modulator> modulators = new ArrayList<Modulator>();
+	private List<Modulator> modulators = new ArrayList<>();
 	private float scale;
 
 	public FilteredBasis() {}

+ 1 - 1
jme3-terrain/src/main/java/com/jme3/terrain/noise/basis/Noise.java

@@ -44,7 +44,7 @@ import java.util.List;
  */
 public abstract class Noise implements Basis {
 
-	protected List<Modulator> modulators = new ArrayList<Modulator>();
+	protected List<Modulator> modulators = new ArrayList<>();
 
 	protected float scale = 1.0f;
 

+ 2 - 2
jme3-terrain/src/main/java/com/jme3/terrain/noise/filter/AbstractFilter.java

@@ -36,8 +36,8 @@ import java.util.List;
 
 public abstract class AbstractFilter implements Filter {
 
-	protected List<Filter> preFilters = new ArrayList<Filter>();
-	protected List<Filter> postFilters = new ArrayList<Filter>();
+	protected List<Filter> preFilters = new ArrayList<>();
+	protected List<Filter> postFilters = new ArrayList<>();
 
 	private boolean enabled = true;
 

+ 2 - 2
jme3-terrain/src/main/java/com/jme3/terrain/noise/filter/IterativeFilter.java

@@ -38,8 +38,8 @@ public class IterativeFilter extends AbstractFilter {
 
 	private int iterations;
 
-	private List<Filter> preIterateFilters = new ArrayList<Filter>();
-	private List<Filter> postIterateFilters = new ArrayList<Filter>();
+	private List<Filter> preIterateFilters = new ArrayList<>();
+	private List<Filter> postIterateFilters = new ArrayList<>();
 	private Filter filter;
 
 	@Override

+ 2 - 2
jme3-vr/src/main/java/com/jme3/app/VRApplication.java

@@ -195,7 +195,7 @@ public abstract class VRApplication implements Application, SystemListener {
     private float speed = 1f;
     private AudioRenderer audioRenderer;    
     private LostFocusBehavior lostFocusBehavior = LostFocusBehavior.ThrottleOnLostFocus;
-    private final ConcurrentLinkedQueue<AppTask<?>> taskQueue = new ConcurrentLinkedQueue<AppTask<?>>();
+    private final ConcurrentLinkedQueue<AppTask<?>> taskQueue = new ConcurrentLinkedQueue<>();
     private Timer timer = new NanoTimer();
     private boolean paused = false, inputEnabled = true;
     private InputManager inputManager;
@@ -1458,7 +1458,7 @@ public abstract class VRApplication implements Application, SystemListener {
     
     @Override
     public <V> Future<V> enqueue(Callable<V> callable) {
-        AppTask<V> task = new AppTask<V>(callable);
+        AppTask<V> task = new AppTask<>(callable);
         taskQueue.add(task);
         return task;
     }

+ 2 - 2
jme3-vr/src/main/java/com/jme3/input/lwjgl/GlfwKeyInputVR.java

@@ -1,7 +1,7 @@
 package com.jme3.input.lwjgl;
 
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,7 @@ public class GlfwKeyInputVR implements KeyInput {
     private RawInputListener listener;
     private boolean initialized, shift_pressed;
     private GLFWKeyCallback keyCallback;
-    private Queue<KeyInputEvent> keyInputEvents = new LinkedList<KeyInputEvent>();
+    private Queue<KeyInputEvent> keyInputEvents = new LinkedList<>();
 
     /**
      * Create a new input attached to the given {@link LwjglWindowVR context}.

+ 4 - 4
jme3-vr/src/main/java/com/jme3/input/lwjgl/GlfwMouseInputVR.java

@@ -1,7 +1,7 @@
 package com.jme3.input.lwjgl;
 
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -81,10 +81,10 @@ public class GlfwMouseInputVR implements MouseInput {
     private GLFWCursorPosCallback cursorPosCallback;
     private GLFWScrollCallback scrollCallback;
     private GLFWMouseButtonCallback mouseButtonCallback;
-    private Queue<MouseMotionEvent> mouseMotionEvents = new LinkedList<MouseMotionEvent>();
-    private Queue<MouseButtonEvent> mouseButtonEvents = new LinkedList<MouseButtonEvent>();
+    private Queue<MouseMotionEvent> mouseMotionEvents = new LinkedList<>();
+    private Queue<MouseButtonEvent> mouseButtonEvents = new LinkedList<>();
 
-    private Map<JmeCursor, Long> jmeToGlfwCursorMap = new HashMap<JmeCursor, Long>();
+    private Map<JmeCursor, Long> jmeToGlfwCursorMap = new HashMap<>();
 
     /**
      * Create a new mouse input attached to the given {@link LwjglWindowVR context}.

+ 2 - 2
jme3-vr/src/main/java/com/jme3/shadow/AbstractShadowRendererVR.java

@@ -1,7 +1,7 @@
 package com.jme3.shadow;
 
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -108,7 +108,7 @@ public abstract class AbstractShadowRendererVR implements SceneProcessor, Savabl
     /**
      * list of materials for post shadow queue geometries
      */
-    protected List<Material> matCache = new ArrayList<Material>();
+    protected List<Material> matCache = new ArrayList<>();
     protected GeometryList lightReceivers = new GeometryList(new OpaqueComparator());
     protected GeometryList shadowMapOccluders = new GeometryList(new OpaqueComparator());
     private String[] shadowMapStringCache;