Explorar o código

jme3-examples: finalize private fields

Stephen Gold %!s(int64=4) %!d(string=hai) anos
pai
achega
8f03c9579c
Modificáronse 100 ficheiros con 294 adicións e 294 borrados
  1. 4 4
      jme3-examples/src/main/java/jme3test/app/TestCloner.java
  2. 6 6
      jme3-examples/src/main/java/jme3test/app/TestIDList.java
  3. 2 2
      jme3-examples/src/main/java/jme3test/app/state/RootNodeState.java
  4. 2 2
      jme3-examples/src/main/java/jme3test/audio/TestMusicPlayer.java
  5. 18 18
      jme3-examples/src/main/java/jme3test/batching/TestBatchNodeCluster.java
  6. 6 6
      jme3-examples/src/main/java/jme3test/batching/TestBatchNodeTower.java
  7. 5 5
      jme3-examples/src/main/java/jme3test/bullet/BombControl.java
  8. 2 2
      jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.java
  9. 2 2
      jme3-examples/src/main/java/jme3test/bullet/TestAttachGhostObject.java
  10. 4 4
      jme3-examples/src/main/java/jme3test/bullet/TestBetterCharacter.java
  11. 5 5
      jme3-examples/src/main/java/jme3test/bullet/TestBrickTower.java
  12. 4 4
      jme3-examples/src/main/java/jme3test/bullet/TestBrickWall.java
  13. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java
  14. 6 6
      jme3-examples/src/main/java/jme3test/bullet/TestIssue877.java
  15. 2 2
      jme3-examples/src/main/java/jme3test/bullet/TestPhysicsCar.java
  16. 3 3
      jme3-examples/src/main/java/jme3test/bullet/TestPhysicsCharacter.java
  17. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestPhysicsRayCast.java
  18. 2 2
      jme3-examples/src/main/java/jme3test/bullet/TestQ3.java
  19. 3 3
      jme3-examples/src/main/java/jme3test/bullet/TestRagDoll.java
  20. 2 2
      jme3-examples/src/main/java/jme3test/bullet/TestSweepTest.java
  21. 4 4
      jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java
  22. 5 5
      jme3-examples/src/main/java/jme3test/collision/RayTrace.java
  23. 1 1
      jme3-examples/src/main/java/jme3test/collision/TestTriangleCollision.java
  24. 2 2
      jme3-examples/src/main/java/jme3test/effect/TestEverything.java
  25. 2 2
      jme3-examples/src/main/java/jme3test/effect/TestExplosionEffect.java
  26. 2 2
      jme3-examples/src/main/java/jme3test/games/CubeField.java
  27. 3 3
      jme3-examples/src/main/java/jme3test/gui/TestBitmapFont.java
  28. 5 5
      jme3-examples/src/main/java/jme3test/gui/TestBitmapFontLayout.java
  29. 2 2
      jme3-examples/src/main/java/jme3test/gui/TestBitmapText3D.java
  30. 1 1
      jme3-examples/src/main/java/jme3test/gui/TestCursor.java
  31. 2 2
      jme3-examples/src/main/java/jme3test/gui/TestRtlBitmapText.java
  32. 2 2
      jme3-examples/src/main/java/jme3test/gui/TestSoftwareMouse.java
  33. 1 1
      jme3-examples/src/main/java/jme3test/helloworld/HelloAnimation.java
  34. 1 1
      jme3-examples/src/main/java/jme3test/helloworld/HelloAudio.java
  35. 3 3
      jme3-examples/src/main/java/jme3test/helloworld/HelloCollision.java
  36. 2 2
      jme3-examples/src/main/java/jme3test/helloworld/HelloInput.java
  37. 1 1
      jme3-examples/src/main/java/jme3test/helloworld/HelloPhysics.java
  38. 2 2
      jme3-examples/src/main/java/jme3test/helloworld/HelloPicking.java
  39. 4 4
      jme3-examples/src/main/java/jme3test/helloworld/HelloTerrainCollision.java
  40. 1 1
      jme3-examples/src/main/java/jme3test/input/TestCameraNode.java
  41. 2 2
      jme3-examples/src/main/java/jme3test/input/TestControls.java
  42. 6 6
      jme3-examples/src/main/java/jme3test/input/TestJoystick.java
  43. 6 6
      jme3-examples/src/main/java/jme3test/input/combomoves/ComboMove.java
  44. 2 2
      jme3-examples/src/main/java/jme3test/input/combomoves/ComboMoveExecution.java
  45. 2 2
      jme3-examples/src/main/java/jme3test/input/combomoves/TestComboMoves.java
  46. 7 7
      jme3-examples/src/main/java/jme3test/light/ShadowTestUIManager.java
  47. 2 2
      jme3-examples/src/main/java/jme3test/light/TestConeVSFrustum.java
  48. 2 2
      jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java
  49. 3 3
      jme3-examples/src/main/java/jme3test/light/TestLightingFog.java
  50. 3 3
      jme3-examples/src/main/java/jme3test/light/TestManyLightsSingle.java
  51. 6 6
      jme3-examples/src/main/java/jme3test/light/TestObbVsBounds.java
  52. 1 1
      jme3-examples/src/main/java/jme3test/light/TestPointDirectionalAndSpotLightShadows.java
  53. 1 1
      jme3-examples/src/main/java/jme3test/light/TestSpotLight.java
  54. 1 1
      jme3-examples/src/main/java/jme3test/light/TestSpotLightShadows.java
  55. 7 7
      jme3-examples/src/main/java/jme3test/light/TestSpotLightTerrain.java
  56. 1 1
      jme3-examples/src/main/java/jme3test/light/TestTangentSpace.java
  57. 2 2
      jme3-examples/src/main/java/jme3test/material/TestMatParamOverride.java
  58. 1 1
      jme3-examples/src/main/java/jme3test/material/TestParallax.java
  59. 2 2
      jme3-examples/src/main/java/jme3test/material/TestParallaxPBR.java
  60. 5 5
      jme3-examples/src/main/java/jme3test/model/TestGltfLoading.java
  61. 1 1
      jme3-examples/src/main/java/jme3test/model/anim/TestAnimMigration.java
  62. 1 1
      jme3-examples/src/main/java/jme3test/model/anim/TestAnimMorphSerialization.java
  63. 1 1
      jme3-examples/src/main/java/jme3test/model/anim/TestAnimSerialization.java
  64. 2 2
      jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java
  65. 3 3
      jme3-examples/src/main/java/jme3test/model/anim/TestHWSkinning.java
  66. 3 3
      jme3-examples/src/main/java/jme3test/model/anim/TestHWSkinningOld.java
  67. 1 1
      jme3-examples/src/main/java/jme3test/model/anim/TestMorph.java
  68. 2 2
      jme3-examples/src/main/java/jme3test/model/anim/TestSkeletonControlRefresh.java
  69. 2 2
      jme3-examples/src/main/java/jme3test/network/MovingAverage.java
  70. 3 3
      jme3-examples/src/main/java/jme3test/network/TestThroughput.java
  71. 1 1
      jme3-examples/src/main/java/jme3test/post/SSAOUI.java
  72. 1 1
      jme3-examples/src/main/java/jme3test/post/TestDepthOfField.java
  73. 2 2
      jme3-examples/src/main/java/jme3test/post/TestFBOPassthrough.java
  74. 1 1
      jme3-examples/src/main/java/jme3test/post/TestMultiplesFilters.java
  75. 1 1
      jme3-examples/src/main/java/jme3test/post/TestPostFilters.java
  76. 5 5
      jme3-examples/src/main/java/jme3test/renderer/TestAlphaToCoverage.java
  77. 2 2
      jme3-examples/src/main/java/jme3test/renderer/TestDepthStencil.java
  78. 2 2
      jme3-examples/src/main/java/jme3test/renderer/TestSplitScreen.java
  79. 3 3
      jme3-examples/src/main/java/jme3test/scene/TestSceneLoading.java
  80. 4 4
      jme3-examples/src/main/java/jme3test/scene/TestSceneStress.java
  81. 2 2
      jme3-examples/src/main/java/jme3test/scene/instancing/TestInstanceNode.java
  82. 3 3
      jme3-examples/src/main/java/jme3test/scene/instancing/TestInstancedNodeAttachDetachWithPicking.java
  83. 3 3
      jme3-examples/src/main/java/jme3test/scene/instancing/TestInstancedNodeAttachDetachWithShadowFilter.java
  84. 2 2
      jme3-examples/src/main/java/jme3test/stress/TestBatchLod.java
  85. 2 2
      jme3-examples/src/main/java/jme3test/stress/TestLodGeneration.java
  86. 1 1
      jme3-examples/src/main/java/jme3test/stress/TestParallelTangentGeneration.java
  87. 3 3
      jme3-examples/src/main/java/jme3test/terrain/TerrainFractalGridTest.java
  88. 3 3
      jme3-examples/src/main/java/jme3test/terrain/TerrainGridAlphaMapTest.java
  89. 1 1
      jme3-examples/src/main/java/jme3test/terrain/TerrainGridSerializationTest.java
  90. 5 5
      jme3-examples/src/main/java/jme3test/terrain/TerrainGridTest.java
  91. 5 5
      jme3-examples/src/main/java/jme3test/terrain/TerrainGridTileLoaderTest.java
  92. 1 1
      jme3-examples/src/main/java/jme3test/terrain/TerrainTest.java
  93. 3 3
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestAdvanced.java
  94. 1 1
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestAndroid.java
  95. 1 1
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestCollision.java
  96. 7 7
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestModifyHeight.java
  97. 6 6
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestReadWrite.java
  98. 9 9
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestTile.java
  99. 2 2
      jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java
  100. 5 5
      jme3-examples/src/main/java/jme3test/water/TestPostWater.java

+ 4 - 4
jme3-examples/src/main/java/jme3test/app/TestCloner.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2020 jMonkeyEngine
+ * Copyright (c) 2016-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -197,7 +197,7 @@ public class TestCloner {
     
     public static class GraphNode implements Cloneable, JmeCloneable {
  
-        private String name;       
+        final private String name;       
         private List<GraphNode> links = new ArrayList<>();
         
         public GraphNode( String name ) {
@@ -262,9 +262,9 @@ public class TestCloner {
     
         private int[] intArray;
         private int[][] intArray2D;
-        private Object[] objects;
+        final private Object[] objects;
         private RegularObject[] regularObjects;
-        private String[] strings;
+        final private String[] strings;
  
         public ArrayHolder( int... values ) {
             this.intArray = values;

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

@@ -39,9 +39,9 @@ public class TestIDList {
 
     static class StateCol {
 
-        private static Random rand = new Random();
+        final private static Random rand = new Random();
 
-        private Map<Integer, Object> objs = new HashMap<Integer, Object>();
+        final private Map<Integer, Object> objs = new HashMap<Integer, Object>();
 
         public StateCol(){
             // populate with free ids
@@ -74,11 +74,11 @@ public class TestIDList {
 
     }
 
-    private static IDList list = new IDList();
-    private static int boundSlot = 0;
+    final private static IDList list = new IDList();
+    final private static int boundSlot = 0;
     
-    private static Object[] slots = new Object[16];
-    private static boolean[] enabledSlots = new boolean[16];
+    final private static Object[] slots = new Object[16];
+    final private static boolean[] enabledSlots = new boolean[16];
 
     static void enable(int slot){
         System.out.println("Enabled SLOT["+slot+"]");

+ 2 - 2
jme3-examples/src/main/java/jme3test/app/state/RootNodeState.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,7 +37,7 @@ import com.jme3.scene.Node;
 
 public class RootNodeState extends AbstractAppState {
 
-    private Node rootNode = new Node("Root Node");
+    final private Node rootNode = new Node("Root Node");
 
     public Node getRootNode(){
         return rootNode;

+ 2 - 2
jme3-examples/src/main/java/jme3test/audio/TestMusicPlayer.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,7 +50,7 @@ public class TestMusicPlayer extends javax.swing.JFrame {
     private AudioNode musicSource;
     private float musicLength = 0;
     private float curTime = 0;
-    private Listener listener = new Listener();
+    final private Listener listener = new Listener();
 
     public TestMusicPlayer() {
         initComponents();

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

@@ -63,7 +63,7 @@ public class TestBatchNodeCluster extends SimpleApplication {
         app.setShowSettings(false); 
         app.start();
     }
-    private ActionListener al = new ActionListener() {
+    final private ActionListener al = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean isPressed, float tpf) {
@@ -72,20 +72,20 @@ public class TestBatchNodeCluster extends SimpleApplication {
             }
         }
     };
-    private Random rand = new Random();
-    private int maxCubes = 2000;
-    private int startAt = 0;
-    private static int xPositions = 0, yPositions = 0, zPositions = 0;
-    private int returner = 0;
-    private ArrayList<Integer> xPosition = new ArrayList<Integer>();
-    private ArrayList<Integer> yPosition = new ArrayList<Integer>();
-    private ArrayList<Integer> zPosition = new ArrayList<Integer>();
-    private int xLimitf = 60, xLimits = -60, yLimitf = 60, yLimits = -20, zLimitf = 60, zLimits = -60;
-    private int circ = 8;//increases by 8 every time.
-    private int dynamic = 4;
+    final private Random rand = new Random();
+    final private int maxCubes = 2000;
+    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 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;
     private static AppSettings settingst;
-    private boolean isTrue = true;
-    private int lineLength = 50;
+    final private boolean isTrue = true;
+    final private int lineLength = 50;
     private BatchNode batchNode;
     private Material mat1;
     private Material mat2;
@@ -335,11 +335,11 @@ public class TestBatchNodeCluster extends SimpleApplication {
     public int getz(int i) {
         return zPosition.get(i);
     }
-    private long nbFrames = 0;
-    private long cullTime = 0;
+    final private long nbFrames = 0;
+    final private long cullTime = 0;
     private float time = 0;
-    private Vector3f lookAtPos = new Vector3f(0, 0, 0);
-    private float xpos = 0;
+    final private Vector3f lookAtPos = new Vector3f(0, 0, 0);
+    final private float xpos = 0;
     private Spatial box;
 
     @Override

+ 6 - 6
jme3-examples/src/main/java/jme3test/batching/TestBatchNodeTower.java

@@ -67,11 +67,11 @@ import jme3test.bullet.BombControl;
  */
 public class TestBatchNodeTower extends SimpleApplication {
 
-    private int bricksPerLayer = 8;
-    private int brickLayers = 30;
+    final private int bricksPerLayer = 8;
+    final private int brickLayers = 30;
 
-    private static float brickWidth = .75f, brickHeight = .25f, brickDepth = .25f;
-    private float radius = 3f;
+    final private static float brickWidth = .75f, brickHeight = .25f, brickDepth = .25f;
+    final private float radius = 3f;
     private float angle = 0;
 
 
@@ -84,7 +84,7 @@ public class TestBatchNodeTower extends SimpleApplication {
     private SphereCollisionShape bulletCollisionShape;
 
     private BulletAppState bulletAppState;
-    private BatchNode batchNode = new BatchNode("batch Node");
+    final private BatchNode batchNode = new BatchNode("batch Node");
     
     public static void main(String args[]) {
         TestBatchNodeTower f = new TestBatchNodeTower();
@@ -139,7 +139,7 @@ public class TestBatchNodeTower extends SimpleApplication {
     private PhysicsSpace getPhysicsSpace() {
         return bulletAppState.getPhysicsSpace();
     }
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean keyPressed, float tpf) {

+ 5 - 5
jme3-examples/src/main/java/jme3test/bullet/BombControl.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,12 +61,12 @@ public class BombControl extends RigidBodyControl implements PhysicsCollisionLis
 
     private float explosionRadius = 10;
     private PhysicsGhostObject ghostObject;
-    private Vector3f vector = new Vector3f();
-    private Vector3f vector2 = new Vector3f();
+    final private Vector3f vector = new Vector3f();
+    final private Vector3f vector2 = new Vector3f();
     private float forceFactor = 1;
     private ParticleEmitter effect;
-    private float fxTime = 0.5f;
-    private float maxTime = 4f;
+    final private float fxTime = 0.5f;
+    final private float maxTime = 4f;
     private float curTime = -1.0f;
     private float timer;
 

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.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
@@ -67,7 +67,7 @@ public class TestAttachDriver extends SimpleApplication implements ActionListene
     private final float brakeForce = 100.0f;
     private float steeringValue = 0;
     private float accelerationValue = 0;
-    private Vector3f jumpForce = new Vector3f(0, 3000, 0);
+    final private Vector3f jumpForce = new Vector3f(0, 3000, 0);
     private BulletAppState bulletAppState;
 
     public static void main(String[] args) {

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestAttachGhostObject.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,7 +56,7 @@ public class TestAttachGhostObject extends SimpleApplication implements AnalogLi
     private GhostControl ghostControl;
     private Node collisionNode;
     private Node hammerNode;
-    private Vector3f tempVec = new Vector3f();
+    final private Vector3f tempVec = new Vector3f();
     private BulletAppState bulletAppState;
 
     public static void main(String[] args) {

+ 4 - 4
jme3-examples/src/main/java/jme3test/bullet/TestBetterCharacter.java

@@ -63,12 +63,12 @@ public class TestBetterCharacter extends SimpleApplication implements ActionList
     private BetterCharacterControl physicsCharacter;
     private Node characterNode;
     private CameraNode camNode;
-    private boolean rotate = false;
-    private Vector3f walkDirection = new Vector3f(0, 0, 0);
-    private Vector3f viewDirection = new Vector3f(0, 0, 1);
+    final private boolean rotate = false;
+    final private Vector3f walkDirection = new Vector3f(0, 0, 0);
+    final private Vector3f viewDirection = new Vector3f(0, 0, 1);
     private boolean leftStrafe = false, rightStrafe = false, forward = false, backward = false,
             leftRotate = false, rightRotate = false;
-    private Vector3f normalGravity = new Vector3f(0, -9.81f, 0);
+    final private Vector3f normalGravity = new Vector3f(0, -9.81f, 0);
     private Geometry planet;
 
     public static void main(String[] args) {

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

@@ -90,11 +90,11 @@ import com.jme3.texture.Texture.WrapMode;
  */
 public class TestBrickTower extends SimpleApplication {
 
-    private int bricksPerLayer = 8;
-    private int brickLayers = 30;
+    final private int bricksPerLayer = 8;
+    final private int brickLayers = 30;
 
-    private static float brickWidth = .75f, brickHeight = .25f, brickDepth = .25f;
-    private float radius = 3f;
+    final private static float brickWidth = .75f, brickHeight = .25f, brickDepth = .25f;
+    final private float radius = 3f;
     private float angle = 0;
 
 
@@ -140,7 +140,7 @@ public class TestBrickTower extends SimpleApplication {
     private PhysicsSpace getPhysicsSpace() {
         return bulletAppState.getPhysicsSpace();
     }
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean keyPressed, float tpf) {

+ 4 - 4
jme3-examples/src/main/java/jme3test/bullet/TestBrickWall.java

@@ -61,9 +61,9 @@ import com.jme3.texture.Texture.WrapMode;
  */
 public class TestBrickWall extends SimpleApplication {
 
-    private static float bLength = 0.48f;
-    private static float bWidth = 0.24f;
-    private static float bHeight = 0.12f;
+    final private static float bLength = 0.48f;
+    final private static float bWidth = 0.24f;
+    final private static float bHeight = 0.12f;
     private Material mat;
     private Material mat2;
     private Material mat3;
@@ -109,7 +109,7 @@ public class TestBrickWall extends SimpleApplication {
     private PhysicsSpace getPhysicsSpace() {
         return bulletAppState.getPhysicsSpace();
     }
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean keyPressed, float tpf) {

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

@@ -75,7 +75,7 @@ public class TestHoveringTank extends SimpleApplication implements AnalogListene
     private Spatial spaceCraft;
     private TerrainQuad terrain;
     private Material matRock;
-    private boolean wireframe = false;
+    final private boolean wireframe = false;
     private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;

+ 6 - 6
jme3-examples/src/main/java/jme3test/bullet/TestIssue877.java

@@ -50,12 +50,12 @@ import com.jme3.scene.Node;
 
 public class TestIssue877 extends SimpleApplication {
 
-    private BulletAppState bulletAppState = new BulletAppState();
-    private int numPendulums = 6;
-    private int numFalling = 6;
-    private Node pivots[] = new Node[numPendulums];
-    private Node bobs[] = new Node[numPendulums];
-    private Node falling[] = new Node[numFalling];
+    final private BulletAppState bulletAppState = new BulletAppState();
+    final private int numPendulums = 6;
+    final private int numFalling = 6;
+    final private Node pivots[] = new Node[numPendulums];
+    final private Node bobs[] = new Node[numPendulums];
+    final private Node falling[] = new Node[numFalling];
     private float timeToNextPrint = 1f; // in seconds
 
     public static void main(String[] args) {

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestPhysicsCar.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
@@ -58,7 +58,7 @@ public class TestPhysicsCar extends SimpleApplication implements ActionListener
     private final float brakeForce = 100.0f;
     private float steeringValue = 0;
     private float accelerationValue = 0;
-    private Vector3f jumpForce = new Vector3f(0, 3000, 0);
+    final private Vector3f jumpForce = new Vector3f(0, 3000, 0);
 
     public static void main(String[] args) {
         TestPhysicsCar app = new TestPhysicsCar();

+ 3 - 3
jme3-examples/src/main/java/jme3test/bullet/TestPhysicsCharacter.java

@@ -51,9 +51,9 @@ public class TestPhysicsCharacter extends SimpleApplication implements ActionLis
   private CharacterControl physicsCharacter;
   private Node characterNode;
   private CameraNode camNode;
-  private boolean rotate = false;
-  private Vector3f walkDirection = new Vector3f(0,0,0);
-  private Vector3f viewDirection = new Vector3f(0,0,0);
+  final private boolean rotate = false;
+  final private Vector3f walkDirection = new Vector3f(0,0,0);
+  final private Vector3f viewDirection = new Vector3f(0,0,0);
   private boolean leftStrafe = false, rightStrafe = false, forward = false, backward = false, 
           leftRotate = false, rightRotate = false;
 

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

@@ -19,7 +19,7 @@ import java.util.List;
  */
 public class TestPhysicsRayCast extends SimpleApplication {
 
-    private BulletAppState bulletAppState = new BulletAppState();
+    final private BulletAppState bulletAppState = new BulletAppState();
 
     public static void main(String[] args) {
         new TestPhysicsRayCast().start();

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestQ3.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,7 +57,7 @@ public class TestQ3 extends SimpleApplication implements ActionListener {
     private BulletAppState bulletAppState;
     private Node gameLevel;
     private PhysicsCharacter player;
-    private Vector3f walkDirection = new Vector3f();
+    final private Vector3f walkDirection = new Vector3f();
     private static boolean useHttp = false;
     private boolean left=false,right=false,up=false,down=false;
 

+ 3 - 3
jme3-examples/src/main/java/jme3test/bullet/TestRagDoll.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,9 +50,9 @@ import com.jme3.scene.Node;
 public class TestRagDoll extends SimpleApplication implements ActionListener {
 
     private BulletAppState bulletAppState = new BulletAppState();
-    private Node ragDoll = new Node();
+    final private Node ragDoll = new Node();
     private Node shoulders;
-    private Vector3f upforce = new Vector3f(0, 200, 0);
+    final private Vector3f upforce = new Vector3f(0, 200, 0);
     private boolean applyForce = false;
 
     public static void main(String[] args) {

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestSweepTest.java

@@ -19,12 +19,12 @@ import java.util.List;
  */
 public class TestSweepTest extends SimpleApplication {
 
-    private BulletAppState bulletAppState = new BulletAppState();
+    final private BulletAppState bulletAppState = new BulletAppState();
     private CapsuleCollisionShape obstacleCollisionShape;
     private CapsuleCollisionShape capsuleCollisionShape;
     private Node capsule;
     private Node obstacle;
-    private float dist = .5f;
+    final private float dist = .5f;
 
     public static void main(String[] args) {
         new TestSweepTest().start();

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

@@ -82,7 +82,7 @@ public class TestWalkingChar extends SimpleApplication implements ActionListener
     private CharacterControl character;
     private Node model;
     //temp vectors
-    private Vector3f walkDirection = new Vector3f();
+    final private Vector3f walkDirection = new Vector3f();
     //terrain
     private TerrainQuad terrain;
     private RigidBodyControl terrainPhysicsNode;
@@ -104,9 +104,9 @@ public class TestWalkingChar extends SimpleApplication implements ActionListener
     private ParticleEmitter effect;
     //brick wall
     private Box brick;
-    private float bLength = 0.8f;
-    private float bWidth = 0.4f;
-    private float bHeight = 0.4f;
+    final private float bLength = 0.8f;
+    final private float bWidth = 0.4f;
+    final private float bHeight = 0.4f;
     private FilterPostProcessor fpp;
 
     public static void main(String[] args) {

+ 5 - 5
jme3-examples/src/main/java/jme3test/collision/RayTrace.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,10 +46,10 @@ import javax.swing.JLabel;
 
 public class RayTrace {
 
-    private BufferedImage image;
-    private Camera cam;
-    private Spatial scene;
-    private CollisionResults results = new CollisionResults();
+    final private BufferedImage image;
+    final private Camera cam;
+    final private Spatial scene;
+    final private CollisionResults results = new CollisionResults();
     private JFrame frame;
     private JLabel label;
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/collision/TestTriangleCollision.java

@@ -90,7 +90,7 @@ public class TestTriangleCollision extends SimpleApplication {
                     "MoveRight", "MoveLeft", "MoveUp", "MoveDown"
                 });
     }
-    private AnalogListener analogListener = new AnalogListener() {
+    final private AnalogListener analogListener = new AnalogListener() {
 
         @Override
         public void onAnalog(String name, float value, float tpf) {

+ 2 - 2
jme3-examples/src/main/java/jme3test/effect/TestEverything.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
@@ -54,7 +54,7 @@ public class TestEverything extends SimpleApplication {
 
     private DirectionalLightShadowRenderer dlsr;
     private ToneMapFilter toneMapFilter;
-    private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal();
+    final private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal();
 
     public static void main(String[] args){
         TestEverything app = new TestEverything();

+ 2 - 2
jme3-examples/src/main/java/jme3test/effect/TestExplosionEffect.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 TestExplosionEffect extends SimpleApplication {
 
     private float time = 0;
     private int state = 0;
-    private Node explosionEffect = new Node("explosionFX");
+    final private Node explosionEffect = new Node("explosionFX");
     private ParticleEmitter flame, flash, spark, roundspark, smoketrail, debris,
                             shockwave;
 

+ 2 - 2
jme3-examples/src/main/java/jme3test/games/CubeField.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 CubeField extends SimpleApplication implements AnalogListener {
     private Material playerMaterial;
     private Material floorMaterial;
 
-    private float fpsRate = 1000f / 1f;
+    final private float fpsRate = 1000f / 1f;
 
     /**
      * Initializes game 

+ 3 - 3
jme3-examples/src/main/java/jme3test/gui/TestBitmapFont.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
@@ -94,8 +94,8 @@ public class TestBitmapFont extends SimpleApplication {
         }
     };
 
-    private RawInputListener textListener = new RawInputListener() {
-        private StringBuilder str = new StringBuilder();
+    final private RawInputListener textListener = new RawInputListener() {
+        final private StringBuilder str = new StringBuilder();
 
         @Override
         public void onMouseMotionEvent(MouseMotionEvent evt) { }

+ 5 - 5
jme3-examples/src/main/java/jme3test/gui/TestBitmapFontLayout.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 jMonkeyEngine
+ * Copyright (c) 2018-2021 jMonkeyEngine
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -84,10 +84,10 @@ public class TestBitmapFontLayout extends SimpleApplication {
     public static final float ZOOM_SPEED = 0.1f;
     public static final float SCROLL_SPEED = 50;
  
-    private Node testRoot = new Node("test root");
-    private Node scrollRoot = new Node("scroll root");
-    private Vector3f scroll = new Vector3f(0, 0, 0);
-    private Vector3f zoom = new Vector3f(0, 0, 0);
+    final private Node testRoot = new Node("test root");
+    final private Node scrollRoot = new Node("scroll root");
+    final private Vector3f scroll = new Vector3f(0, 0, 0);
+    final private Vector3f zoom = new Vector3f(0, 0, 0);
     
     public static void main(String[] args){
         TestBitmapFontLayout app = new TestBitmapFontLayout();

+ 2 - 2
jme3-examples/src/main/java/jme3test/gui/TestBitmapText3D.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
@@ -42,7 +42,7 @@ import com.jme3.scene.shape.Quad;
 
 public class TestBitmapText3D extends SimpleApplication {
 
-    private String txtB =
+    final private String txtB =
     "ABCDEFGHIKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()-=_+[]\\;',./{}|:<>?";
 
     public static void main(String[] args){

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

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

+ 2 - 2
jme3-examples/src/main/java/jme3test/gui/TestRtlBitmapText.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
@@ -43,7 +43,7 @@ import com.jme3.font.Rectangle;
 public class TestRtlBitmapText extends SimpleApplication {
 
     // A right to left text.
-    private String text = ".text left to right test a is This";
+    final private String text = ".text left to right test a is This";
 
     public static void main(String[] args) {
         TestRtlBitmapText app = new TestRtlBitmapText();

+ 2 - 2
jme3-examples/src/main/java/jme3test/gui/TestSoftwareMouse.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
@@ -45,7 +45,7 @@ public class TestSoftwareMouse extends SimpleApplication {
 
     private Picture cursor;
 
-    private RawInputListener inputListener = new RawInputListener() {
+    final private RawInputListener inputListener = new RawInputListener() {
 
         private float x = 0, y = 0;
 

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

@@ -102,7 +102,7 @@ public class HelloAnimation extends SimpleApplication
   }
 
   /** Definining the named action that can be triggered by key inputs. */
-  private ActionListener actionListener = new ActionListener() {
+  final private ActionListener actionListener = new ActionListener() {
     @Override
     public void onAction(String name, boolean keyPressed, float tpf) {
       if (name.equals("Walk") && !keyPressed) {

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

@@ -67,7 +67,7 @@ public class HelloAudio extends SimpleApplication {
   }
 
   /** Defining the "Shoot" action: Play a gun sound. */
-  private ActionListener actionListener = new ActionListener() {
+  final private ActionListener actionListener = new ActionListener() {
     @Override
     public void onAction(String name, boolean keyPressed, float tpf) {
       if (name.equals("Shoot") && !keyPressed) {

+ 3 - 3
jme3-examples/src/main/java/jme3test/helloworld/HelloCollision.java

@@ -61,13 +61,13 @@ public class HelloCollision extends SimpleApplication
   private BulletAppState bulletAppState;
   private RigidBodyControl landscape;
   private CharacterControl player;
-  private Vector3f walkDirection = new Vector3f();
+  final private Vector3f walkDirection = new Vector3f();
   private boolean left = false, right = false, up = false, down = false;
   
   //Temporary vectors used on each frame.
   //They here to avoid instanciating new vectors on each frame
-  private Vector3f camDir = new Vector3f();
-  private Vector3f camLeft = new Vector3f();
+  final private Vector3f camDir = new Vector3f();
+  final private Vector3f camLeft = new Vector3f();
 
   public static void main(String[] args) {
     HelloCollision app = new HelloCollision();

+ 2 - 2
jme3-examples/src/main/java/jme3test/helloworld/HelloInput.java

@@ -80,7 +80,7 @@ public class HelloInput extends SimpleApplication {
   }
 
   /** Use this listener for KeyDown/KeyUp events */
-  private ActionListener actionListener = new ActionListener() {
+  final private ActionListener actionListener = new ActionListener() {
     @Override
     public void onAction(String name, boolean keyPressed, float tpf) {
       if (name.equals("Pause") && !keyPressed) {
@@ -90,7 +90,7 @@ public class HelloInput extends SimpleApplication {
   };
 
   /** Use this listener for continuous events */
-  private AnalogListener analogListener = new AnalogListener() {
+  final private AnalogListener analogListener = new AnalogListener() {
     @Override
     public void onAnalog(String name, float value, float tpf) {
       if (isRunning) {

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

@@ -122,7 +122,7 @@ public class HelloPhysics extends SimpleApplication {
    * Every time the shoot action is triggered, a new cannon ball is produced.
    * The ball is set up to fly from the camera position in the camera direction.
    */
-  private ActionListener actionListener = new ActionListener() {
+  final private ActionListener actionListener = new ActionListener() {
     @Override
     public void onAction(String name, boolean keyPressed, float tpf) {
       if (name.equals("shoot") && !keyPressed) {

+ 2 - 2
jme3-examples/src/main/java/jme3test/helloworld/HelloPicking.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
@@ -88,7 +88,7 @@ public class HelloPicking extends SimpleApplication {
     inputManager.addListener(actionListener, "Shoot");
   }
   /** Defining the "Shoot" action: Determine what was hit and how to respond. */
-  private ActionListener actionListener = new ActionListener() {
+  final private ActionListener actionListener = new ActionListener() {
 
     @Override
     public void onAction(String name, boolean keyPressed, float tpf) {

+ 4 - 4
jme3-examples/src/main/java/jme3test/helloworld/HelloTerrainCollision.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,14 +63,14 @@ public class HelloTerrainCollision extends SimpleApplication
   private BulletAppState bulletAppState;
   private RigidBodyControl landscape;
   private CharacterControl player;
-  private Vector3f walkDirection = new Vector3f();
+  final private Vector3f walkDirection = new Vector3f();
   private boolean left = false, right = false, up = false, down = false;
   private TerrainQuad terrain;
   private Material mat_terrain;
   //Temporary vectors used on each frame.
   //They here to avoid instanciating new vectors on each frame
-  private Vector3f camDir = new Vector3f();
-  private Vector3f camLeft = new Vector3f();
+  final private Vector3f camDir = new Vector3f();
+  final private Vector3f camLeft = new Vector3f();
 
   public static void main(String[] args) {
     HelloTerrainCollision app = new HelloTerrainCollision();

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

@@ -53,7 +53,7 @@ public class TestCameraNode extends SimpleApplication implements AnalogListener,
   private Node teaNode;
   private CameraNode camNode;
   private boolean rotate = false;
-  private Vector3f direction = new Vector3f();
+  final private Vector3f direction = new Vector3f();
 
   public static void main(String[] args) {
     TestCameraNode app = new TestCameraNode();

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

@@ -42,13 +42,13 @@ import com.jme3.input.controls.MouseAxisTrigger;
 
 public class TestControls extends SimpleApplication {
     
-    private ActionListener actionListener = new ActionListener(){
+    final private ActionListener actionListener = new ActionListener(){
         @Override
         public void onAction(String name, boolean pressed, float tpf){
             System.out.println(name + " = " + pressed);
         }
     };
-    private AnalogListener analogListener = new AnalogListener() {
+    final private AnalogListener analogListener = new AnalogListener() {
         @Override
         public void onAnalog(String name, float value, float tpf) {
             System.out.println(name + " = " + value);

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

@@ -160,7 +160,7 @@ public class TestJoystick extends SimpleApplication {
      */   
     protected class JoystickEventListener implements RawInputListener {
 
-        private Map<JoystickAxis, Float> lastValues = new HashMap<>();
+        final private Map<JoystickAxis, Float> lastValues = new HashMap<>();
 
         @Override
         public void onJoyAxisEvent(JoyAxisEvent evt) {
@@ -216,10 +216,10 @@ public class TestJoystick extends SimpleApplication {
         private float lastPovX = 0;
         private float lastPovY = 0;
  
-        private Geometry leftStick;
-        private Geometry rightStick;
+        final private Geometry leftStick;
+        final private Geometry rightStick;
             
-        private Map<String, ButtonView> buttons = new HashMap<String, ButtonView>();
+        final private Map<String, ButtonView> buttons = new HashMap<String, ButtonView>();
     
         public GamepadView() {
             super( "gamepad" );
@@ -419,8 +419,8 @@ public class TestJoystick extends SimpleApplication {
     protected class ButtonView extends Node {
  
         private int state = 0;
-        private Material material;
-        private ColorRGBA hilite = new ColorRGBA( 0.0f, 0.75f, 0.75f, 0.5f );
+        final private Material material;
+        final private ColorRGBA hilite = new ColorRGBA( 0.0f, 0.75f, 0.75f, 0.5f );
         
         public ButtonView( String name, float x, float y, float width, float height ) {
             super( "Button:" + name );

+ 6 - 6
jme3-examples/src/main/java/jme3test/input/combomoves/ComboMove.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
@@ -39,9 +39,9 @@ public class ComboMove {
 
     public static class ComboMoveState {
         
-        private String[] pressedMappings;
-        private String[] unpressedMappings;
-        private float timeElapsed;
+        final private String[] pressedMappings;
+        final private String[] unpressedMappings;
+        final private float timeElapsed;
 
         public ComboMoveState(String[] pressedMappings, String[] unpressedMappings, float timeElapsed) {
             this.pressedMappings = pressedMappings;
@@ -63,8 +63,8 @@ public class ComboMove {
         
     }
 
-    private String moveName;
-    private List<ComboMoveState> states = new ArrayList<ComboMoveState>();
+    final private String moveName;
+    final private List<ComboMoveState> states = new ArrayList<ComboMoveState>();
     private boolean useFinalState = true;
     private float priority = 1;
     private float castTime = 0.8f;

+ 2 - 2
jme3-examples/src/main/java/jme3test/input/combomoves/ComboMoveExecution.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 @@ public class ComboMoveExecution {
 
     private static final float TIME_LIMIT = 0.3f;
 
-    private ComboMove moveDef;
+    final private ComboMove moveDef;
     private int state;
     private float moveTime;
     private boolean finalState = false;

+ 2 - 2
jme3-examples/src/main/java/jme3test/input/combomoves/TestComboMoves.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
@@ -44,7 +44,7 @@ import java.util.List;
 
 public class TestComboMoves extends SimpleApplication implements ActionListener {
 
-    private HashSet<String> pressedMappings = new HashSet<String>();
+    final private HashSet<String> pressedMappings = new HashSet<String>();
 
     private ComboMove fireball;
     private ComboMoveExecution fireballExec;

+ 7 - 7
jme3-examples/src/main/java/jme3test/light/ShadowTestUIManager.java

@@ -24,18 +24,18 @@ import com.jme3.shadow.EdgeFilteringMode;
  */
 public class ShadowTestUIManager implements ActionListener {
 
-    private BitmapText shadowTypeText;
-    private BitmapText shadowCompareText;
-    private BitmapText shadowFilterText;
-    private BitmapText shadowIntensityText;
+    final private BitmapText shadowTypeText;
+    final private BitmapText shadowCompareText;
+    final private BitmapText shadowFilterText;
+    final private BitmapText shadowIntensityText;
     private final static String TYPE_TEXT = "(Space) Shadow type : ";
     private final static String COMPARE_TEXT = "(enter) Shadow compare ";
     private final static String FILTERING_TEXT = "(f) Edge filtering : ";
     private final static String INTENSITY_TEXT = "(t:up, g:down) Shadow intensity : ";
     private boolean hardwareShadows = true;
-    private AbstractShadowRenderer plsr;
-    private AbstractShadowFilter plsf;
-    private ViewPort viewPort;
+    final private AbstractShadowRenderer plsr;
+    final private AbstractShadowFilter plsf;
+    final private ViewPort viewPort;
     private int filteringIndex = 0;
     private int renderModeIndex = 0;
     

+ 2 - 2
jme3-examples/src/main/java/jme3test/light/TestConeVSFrustum.java

@@ -229,8 +229,8 @@ public class TestConeVSFrustum extends SimpleApplication {
     }
     private Geometry boxGeo, boxGeo2;
     private final static float MOVE_SPEED = 60;
-    private Vector3f tmp = new Vector3f();
-    private Quaternion tmpQuat = new Quaternion();
+    final private Vector3f tmp = new Vector3f();
+    final private Quaternion tmpQuat = new Quaternion();
     private boolean moving, shift;
     private boolean panning;
     private Geometry geom;

+ 2 - 2
jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java

@@ -339,8 +339,8 @@ public class TestDirectionalLightShadow extends SimpleApplication implements Act
     private boolean right = false;
     private boolean fwd = false;
     private boolean back = false;
-    private float time = 0;
-    private float s = 1f;
+    final private float time = 0;
+    final private float s = 1f;
 
     @Override
     public void simpleUpdate(float tpf) {

+ 3 - 3
jme3-examples/src/main/java/jme3test/light/TestLightingFog.java

@@ -17,9 +17,9 @@ import com.jme3.scene.shape.Sphere;
 public class TestLightingFog extends SimpleApplication implements ActionListener {
 
     private Material material;
-    private Vector2f linear = new Vector2f(25, 120);
-    private float exp = 0.015f;
-    private float expsq = 0.02f;
+    final private Vector2f linear = new Vector2f(25, 120);
+    final private float exp = 0.015f;
+    final private float expsq = 0.02f;
 
     public static void main(String[] args) {
         TestLightingFog testLightingFog = new TestLightingFog();

+ 3 - 3
jme3-examples/src/main/java/jme3test/light/TestManyLightsSingle.java

@@ -240,7 +240,7 @@ public class TestManyLightsSingle extends SimpleApplication {
     private BitmapText helloText;
     private long time;
     private long nbFrames;
-    private long startTime = 0;
+    final private long startTime = 0;
 
     @Override
     public void simpleUpdate(float tpf) {
@@ -257,8 +257,8 @@ public class TestManyLightsSingle extends SimpleApplication {
 
     class MoveControl extends AbstractControl {
 
-        private float direction;
-        private Vector3f origPos = new Vector3f();
+        final private float direction;
+        final private Vector3f origPos = new Vector3f();
 
         public MoveControl(float direction) {
             this.direction = direction;

+ 6 - 6
jme3-examples/src/main/java/jme3test/light/TestObbVsBounds.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,16 +53,16 @@ import com.jme3.util.TempVars;
 public class TestObbVsBounds extends SimpleApplication {
 
     private Node ln;
-    private BoundingBox aabb = new BoundingBox();
-    private BoundingSphere sphere = new BoundingSphere(10, new Vector3f(-30, 0, -60));
+    final private BoundingBox aabb = new BoundingBox();
+    final private BoundingSphere sphere = new BoundingSphere(10, new Vector3f(-30, 0, -60));
 
     private final static float MOVE_SPEED = 60;
-    private Vector3f tmp = new Vector3f();
-    private Quaternion tmpQuat = new Quaternion();
+    final private Vector3f tmp = new Vector3f();
+    final private Quaternion tmpQuat = new Quaternion();
     private boolean moving, shift;
     private boolean panning;
 
-    private OrientedBoxProbeArea area = new OrientedBoxProbeArea();
+    final private OrientedBoxProbeArea area = new OrientedBoxProbeArea();
     private Camera frustumCam;
 
     private Geometry areaGeom;

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestPointDirectionalAndSpotLightShadows.java

@@ -69,7 +69,7 @@ public class TestPointDirectionalAndSpotLightShadows extends SimpleApplication {
     private SpotLightShadowFilter slsf;
     private SpotLight spotLight;
     
-    private boolean useFilter = false;
+    final private boolean useFilter = false;
     
     @Override
     public void simpleInitApp() {

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestSpotLight.java

@@ -47,7 +47,7 @@ import com.jme3.util.TangentBinormalGenerator;
 
 public class TestSpotLight extends SimpleApplication {
 
-    private Vector3f lightTarget = new Vector3f(12, 3.5f, 30);
+    final private Vector3f lightTarget = new Vector3f(12, 3.5f, 30);
 
     public static void main(String[] args){
         TestSpotLight app = new TestSpotLight();

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestSpotLightShadows.java

@@ -53,7 +53,7 @@ import com.jme3.util.TangentBinormalGenerator;
 
 public class TestSpotLightShadows extends SimpleApplication {
 
-    private Vector3f lightTarget = new Vector3f(12, 3.5f, 30);
+    final private Vector3f lightTarget = new Vector3f(12, 3.5f, 30);
 
     public static void main(String[] args) {
         TestSpotLightShadows app = new TestSpotLightShadows();

+ 7 - 7
jme3-examples/src/main/java/jme3test/light/TestSpotLightTerrain.java

@@ -63,16 +63,16 @@ public class TestSpotLightTerrain extends SimpleApplication {
     private TerrainQuad terrain;
     private Material matTerrain;
     private Material matWire;
-    private boolean wireframe = false;
-    private boolean triPlanar = false;
-    private boolean wardiso = false;
-    private boolean minnaert = false;
+    final private boolean wireframe = false;
+    final private boolean triPlanar = false;
+    final private boolean wardiso = false;
+    final private boolean minnaert = false;
     private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;
-    private float grassScale = 64;
-    private float dirtScale = 16;
-    private float rockScale = 128;
+    final private float grassScale = 64;
+    final private float dirtScale = 16;
+    final private float rockScale = 128;
     private SpotLight sl;
 
     public static void main(String[] args) {

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestTangentSpace.java

@@ -27,7 +27,7 @@ public class TestTangentSpace extends SimpleApplication {
         app.start();
     }
     
-    private Node debugNode = new Node("debug");
+    final private Node debugNode = new Node("debug");
     
     @Override
     public void simpleInitApp() {

+ 2 - 2
jme3-examples/src/main/java/jme3test/material/TestMatParamOverride.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2017 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@ import com.jme3.shader.VarType;
  */
 public class TestMatParamOverride extends SimpleApplication {
 
-    private Box box = new Box(1, 1, 1);
+    final private Box box = new Box(1, 1, 1);
     final MatParamOverride overrideYellow
             = new MatParamOverride(VarType.Vector4, "Color",
                     ColorRGBA.Yellow);

+ 1 - 1
jme3-examples/src/main/java/jme3test/material/TestParallax.java

@@ -144,7 +144,7 @@ public class TestParallax extends SimpleApplication {
         inputManager.addMapping("toggleSteep", new KeyTrigger(KeyInput.KEY_SPACE));
     }
     private float parallaxHeigh = 0.05f;
-    private float time = 0;
+    final private float time = 0;
     private boolean steep = false;
 
     @Override

+ 2 - 2
jme3-examples/src/main/java/jme3test/material/TestParallaxPBR.java

@@ -49,7 +49,7 @@ import com.jme3.util.TangentBinormalGenerator;
 
 public class TestParallaxPBR extends SimpleApplication {
 
-    private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal();
+    final private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal();
 
     public static void main(String[] args) {
         TestParallaxPBR app = new TestParallaxPBR();
@@ -146,7 +146,7 @@ public class TestParallaxPBR extends SimpleApplication {
         inputManager.addMapping("toggleSteep", new KeyTrigger(KeyInput.KEY_SPACE));
     }
     private float parallaxHeigh = 0.05f;
-    private float time = 0;
+    final private float time = 0;
     private boolean steep = false;
 
     @Override

+ 5 - 5
jme3-examples/src/main/java/jme3test/model/TestGltfLoading.java

@@ -50,18 +50,18 @@ import java.util.*;
 
 public class TestGltfLoading extends SimpleApplication {
 
-    private Node autoRotate = new Node("autoRotate");
-    private List<Spatial> assets = new ArrayList<>();
+    final private Node autoRotate = new Node("autoRotate");
+    final private List<Spatial> assets = new ArrayList<>();
     private Node probeNode;
     private float time = 0;
     private int assetIndex = 0;
     private boolean useAutoRotate = false;
     private final static String indentString = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
-    private int duration = 1;
+    final private int duration = 1;
     private boolean playAnim = true;
 
     private Geometry g;
-    private int morphIndex = 0;
+    final private int morphIndex = 0;
 
 
     public static void main(String[] args) {
@@ -264,7 +264,7 @@ public class TestGltfLoading extends SimpleApplication {
 
     }
 
-    private Queue<String> anims = new LinkedList<>();
+    final private Queue<String> anims = new LinkedList<>();
     private AnimComposer composer;
 
     private void playFirstAnim(Spatial s) {

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

@@ -26,7 +26,7 @@ public class TestAnimMigration extends SimpleApplication {
 
     private ArmatureDebugAppState debugAppState;
     private AnimComposer composer;
-    private LinkedList<String> anims = new LinkedList<>();
+    final private LinkedList<String> anims = new LinkedList<>();
     private boolean playAnim = false;
     private BlendAction action;
     private float blendValue = 1f;

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

@@ -26,7 +26,7 @@ public class TestAnimMorphSerialization extends SimpleApplication {
 
     private ArmatureDebugAppState debugAppState;
     private AnimComposer composer;
-    private Queue<String> anims = new LinkedList<>();
+    final private Queue<String> anims = new LinkedList<>();
     private boolean playAnim = true;
     private File file;
 

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

@@ -30,7 +30,7 @@ public class TestAnimSerialization extends SimpleApplication {
 
     private ArmatureDebugAppState debugAppState;
     private AnimComposer composer;
-    private Queue<String> anims = new LinkedList<>();
+    final private Queue<String> anims = new LinkedList<>();
     private boolean playAnim = true;
     private File file;
 

+ 2 - 2
jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.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 @@ public class TestCustomAnim extends SimpleApplication {
 
 	private Joint bone;
 	private Armature armature;
-	private Quaternion rotation = new Quaternion();
+	final private Quaternion rotation = new Quaternion();
 
 	public static void main(String[] args) {
 		TestCustomAnim app = new TestCustomAnim();

+ 3 - 3
jme3-examples/src/main/java/jme3test/model/anim/TestHWSkinning.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,10 +50,10 @@ public class TestHWSkinning extends SimpleApplication implements ActionListener{
 
 
     // private AnimComposer composer;
-    private String[] animNames = {"Dodge", "Walk", "pull", "push"};
+    final private String[] animNames = {"Dodge", "Walk", "pull", "push"};
     private final static int SIZE = 40;
     private boolean hwSkinningEnable = true;
-    private List<SkinningControl> skControls = new ArrayList<>();
+    final private List<SkinningControl> skControls = new ArrayList<>();
     private BitmapText hwsText;
 
     public static void main(String[] args) {

+ 3 - 3
jme3-examples/src/main/java/jme3test/model/anim/TestHWSkinningOld.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,10 +48,10 @@ public class TestHWSkinningOld extends SimpleApplication implements ActionListen
 
     private AnimChannel channel;
     private AnimControl control;
-    private String[] animNames = {"Dodge", "Walk", "pull", "push"};
+    final private String[] animNames = {"Dodge", "Walk", "pull", "push"};
     private final static int SIZE = 50;
     private boolean hwSkinningEnable = true;
-    private List<SkeletonControl> skControls = new ArrayList<SkeletonControl>();
+    final private List<SkeletonControl> skControls = new ArrayList<SkeletonControl>();
     private BitmapText hwsText;
 
     public static void main(String[] args) {

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

@@ -21,7 +21,7 @@ import java.nio.FloatBuffer;
 
 public class TestMorph extends SimpleApplication {
 
-    private float[] weights = new float[2];
+    final private float[] weights = new float[2];
 
     public static void main(String... args) {
         TestMorph app = new TestMorph();

+ 2 - 2
jme3-examples/src/main/java/jme3test/model/anim/TestSkeletonControlRefresh.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
@@ -68,7 +68,7 @@ public class TestSkeletonControlRefresh extends SimpleApplication implements Act
     private AnimComposer animComposer;
     private final static int SIZE = 10;
     private boolean hwSkinningEnable = true;
-    private List<SkinningControl> skinningControls = new ArrayList<>();
+    final private List<SkinningControl> skinningControls = new ArrayList<>();
     private BitmapText hwsText;
  
     public static void main(String[] args) {

+ 2 - 2
jme3-examples/src/main/java/jme3test/network/MovingAverage.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
@@ -34,7 +34,7 @@ package jme3test.network;
 
 class MovingAverage {
 
-    private long[] samples;
+    final private long[] samples;
     private long sum;
     private int count, index;
 

+ 3 - 3
jme3-examples/src/main/java/jme3test/network/TestThroughput.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2020 jMonkeyEngine
+ * Copyright (c) 2011-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,8 @@ public class TestThroughput implements MessageListener<MessageConnection> { //ex
     private static long counter = 0;
     private static long total = 0;
     // Change this flag to test UDP instead of TCP
-    private static boolean testReliable = false;
-    private boolean isOnServer;
+    final private static boolean testReliable = false;
+    final private boolean isOnServer;
 
     public TestThroughput(boolean isOnServer) {
         this.isOnServer = isOnServer;

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

@@ -44,7 +44,7 @@ import com.jme3.post.ssao.SSAOFilter;
  */
 public class SSAOUI {
 
-    private SSAOFilter filter;
+    final private SSAOFilter filter;
 
     public SSAOUI(InputManager inputManager, SSAOFilter filter) {
         this.filter = filter;

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

@@ -32,7 +32,7 @@ import java.util.List;
 public class TestDepthOfField extends SimpleApplication {
 
     private FilterPostProcessor fpp;
-    private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f);
+    final private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f);
     private TerrainQuad terrain;
     private Material matRock;
     private DepthOfFieldFilter dofFilter;

+ 2 - 2
jme3-examples/src/main/java/jme3test/post/TestFBOPassthrough.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
@@ -53,7 +53,7 @@ import com.jme3.ui.Picture;
  */
 public class TestFBOPassthrough extends SimpleApplication {
 
-    private Node fbNode = new Node("Framebuffer Node");
+    final private Node fbNode = new Node("Framebuffer Node");
     private FrameBuffer fb;
 
     public static void main(String[] args){

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

@@ -60,7 +60,7 @@ public class TestMultiplesFilters extends SimpleApplication {
     }
     private SSAOFilter ssaoFilter;
     private FilterPostProcessor fpp;
-    private boolean en = true;
+    final private boolean en = true;
 
     @Override
     public void simpleInitApp() {

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

@@ -53,7 +53,7 @@ import com.jme3.util.TangentBinormalGenerator;
 public class TestPostFilters extends SimpleApplication implements ActionListener {
 
     private FilterPostProcessor fpp;
-    private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal();
+    final private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal();
     private FadeFilter fade;
 
     public static void main(String[] args) {

+ 5 - 5
jme3-examples/src/main/java/jme3test/renderer/TestAlphaToCoverage.java

@@ -25,12 +25,12 @@ public class TestAlphaToCoverage extends SimpleApplication {
         new TestAlphaToCoverage().start();
     }
 
-    private GL gl = new LwjglGL();
-    private GLExt glext = new LwjglGLExt();
-    private GLFbo glfbo = new LwjglGLFboEXT();
-    private GLRenderer glRenderer= new GLRenderer(gl,glext,glfbo);
+    final private GL gl = new LwjglGL();
+    final private GLExt glext = new LwjglGLExt();
+    final private GLFbo glfbo = new LwjglGLFboEXT();
+    final private GLRenderer glRenderer= new GLRenderer(gl,glext,glfbo);
 
-    private EnumSet<Caps> caps = glRenderer.getCaps();
+    final private EnumSet<Caps> caps = glRenderer.getCaps();
 
 
 

+ 2 - 2
jme3-examples/src/main/java/jme3test/renderer/TestDepthStencil.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
@@ -54,7 +54,7 @@ public class TestDepthStencil extends SimpleApplication {
 
     private boolean enableStencil = false;
     
-    private Node fbNode = new Node("Framebuffer Node");
+    final private Node fbNode = new Node("Framebuffer Node");
     private FrameBuffer fb;
 
     public static void main(String[] args){

+ 2 - 2
jme3-examples/src/main/java/jme3test/renderer/TestSplitScreen.java

@@ -51,9 +51,9 @@ import com.jme3.scene.shape.Box;
 public class TestSplitScreen extends SimpleApplication implements ActionListener {
 
     private boolean splitScreen = false;
-    private Box mesh = new Box(1f, 1f, 1f);
+    final private Box mesh = new Box(1f, 1f, 1f);
     private Camera leftCam, rightCam;
-    private Node leftScene = new Node("left scene");
+    final private Node leftScene = new Node("left scene");
     private ViewPort leftView, rightView;
 
     @Override

+ 3 - 3
jme3-examples/src/main/java/jme3test/scene/TestSceneLoading.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,8 +47,8 @@ import java.io.File;
 
 public class TestSceneLoading extends SimpleApplication {
 
-    private Sphere sphereMesh = new Sphere(32, 32, 10, false, true);
-    private Geometry sphere = new Geometry("Sky", sphereMesh);
+    final private Sphere sphereMesh = new Sphere(32, 32, 10, false, true);
+    final private Geometry sphere = new Geometry("Sky", sphereMesh);
     private static boolean useHttp = false;
 
     public static void main(String[] args) {

+ 4 - 4
jme3-examples/src/main/java/jme3test/scene/TestSceneStress.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
@@ -59,10 +59,10 @@ import java.util.Random;
  */
 public class TestSceneStress extends SimpleApplication {
  
-    private static Box BOX = new Box(2f, 0.5f, 0.5f);
+    final private static Box BOX = new Box(2f, 0.5f, 0.5f);
  
     private Material mat;
-    private Random random = new Random(0);
+    final private Random random = new Random(0);
  
     private int totalNodes = 0;
     private int totalGeometry = 0;
@@ -142,7 +142,7 @@ public class TestSceneStress extends SimpleApplication {
     }
     
     private class RotatorControl extends AbstractControl {
-        private float[] rotate;
+        final private float[] rotate;
         
         public RotatorControl( float... rotate ) {
             this.rotate = rotate;

+ 2 - 2
jme3-examples/src/main/java/jme3test/scene/instancing/TestInstanceNode.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,7 +55,7 @@ public class TestInstanceNode extends SimpleApplication  {
     private final Material[] materials = new Material[6];
     private Node instancedNode;
     private float time = 0;
-    private boolean INSTANCING = true;
+    final private boolean INSTANCING = true;
     
     public static void main(String[] args){
         TestInstanceNode app = new TestInstanceNode();

+ 3 - 3
jme3-examples/src/main/java/jme3test/scene/instancing/TestInstancedNodeAttachDetachWithPicking.java

@@ -70,9 +70,9 @@ public class TestInstancedNodeAttachDetachWithPicking extends SimpleApplication
 
     private InstancedNode instancedNode;
 
-    private Vector3f[] locations = new Vector3f[10];
-    private Geometry[] spheres = new Geometry[10];
-    private Geometry[] boxes = new Geometry[10];
+    final private Vector3f[] locations = new Vector3f[10];
+    final private Geometry[] spheres = new Geometry[10];
+    final private Geometry[] boxes = new Geometry[10];
 
     @Override
     public void simpleInitApp() {

+ 3 - 3
jme3-examples/src/main/java/jme3test/scene/instancing/TestInstancedNodeAttachDetachWithShadowFilter.java

@@ -68,9 +68,9 @@ public class TestInstancedNodeAttachDetachWithShadowFilter extends SimpleApplica
     private FilterPostProcessor filterPostProcessor;
     private InstancedNode instancedNode;
 
-    private Vector3f[] locations = new Vector3f[10];
-    private Geometry[] spheres = new Geometry[10];
-    private Geometry[] boxes = new Geometry[10];
+    final private Vector3f[] locations = new Vector3f[10];
+    final private Geometry[] spheres = new Geometry[10];
+    final private Geometry[] boxes = new Geometry[10];
 
     @Override
     public void simpleInitApp() {

+ 2 - 2
jme3-examples/src/main/java/jme3test/stress/TestBatchLod.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,7 +43,7 @@ import jme3tools.optimize.GeometryBatchFactory;
 
 public class TestBatchLod extends SimpleApplication {
 
-    private boolean lod = false;
+    final private boolean lod = false;
 
     public static void main(String[] args) {
         TestBatchLod app = new TestBatchLod();

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

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

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

@@ -41,7 +41,7 @@ import com.jme3.util.TangentBinormalGenerator;
 
 public class TestParallelTangentGeneration {
 
-    private static ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
+    final private static ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
 
     public static void main(String[] args) {
 

+ 3 - 3
jme3-examples/src/main/java/jme3test/terrain/TerrainFractalGridTest.java

@@ -27,9 +27,9 @@ public class TerrainFractalGridTest extends SimpleApplication {
 
     private Material mat_terrain;
     private TerrainGrid terrain;
-    private float grassScale = 64;
-    private float dirtScale = 16;
-    private float rockScale = 128;
+    final private float grassScale = 64;
+    final private float dirtScale = 16;
+    final private float rockScale = 128;
 
     public static void main(final String[] args) {
         TerrainFractalGridTest app = new TerrainFractalGridTest();

+ 3 - 3
jme3-examples/src/main/java/jme3test/terrain/TerrainGridAlphaMapTest.java

@@ -45,9 +45,9 @@ import java.io.File;
 public class TerrainGridAlphaMapTest extends SimpleApplication {
 
     private TerrainGrid terrain;
-    private float grassScale = 64;
-    private float dirtScale = 16;
-    private float rockScale = 128;
+    final private float grassScale = 64;
+    final private float dirtScale = 16;
+    final private float rockScale = 128;
     private boolean usePhysics = false;
 
     public static void main(final String[] args) {

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainGridSerializationTest.java

@@ -26,7 +26,7 @@ import java.io.File;
 public class TerrainGridSerializationTest extends SimpleApplication {
 
     private TerrainGrid terrain;
-    private boolean usePhysics = true;
+    final private boolean usePhysics = true;
 
     public static void main(final String[] args) {
         TerrainGridSerializationTest app = new TerrainGridSerializationTest();

+ 5 - 5
jme3-examples/src/main/java/jme3test/terrain/TerrainGridTest.java

@@ -31,11 +31,11 @@ public class TerrainGridTest extends SimpleApplication {
 
     private Material mat_terrain;
     private TerrainGrid terrain;
-    private float grassScale = 64;
-    private float dirtScale = 16;
-    private float rockScale = 128;
-    private boolean usePhysics = false;
-    private boolean physicsAdded = false;
+    final private float grassScale = 64;
+    final private float dirtScale = 16;
+    final private float rockScale = 128;
+    final private boolean usePhysics = false;
+    final private boolean physicsAdded = false;
 
     public static void main(final String[] args) {
         TerrainGridTest app = new TerrainGridTest();

+ 5 - 5
jme3-examples/src/main/java/jme3test/terrain/TerrainGridTileLoaderTest.java

@@ -34,11 +34,11 @@ public class TerrainGridTileLoaderTest extends SimpleApplication {
 
     private Material mat_terrain;
     private TerrainGrid terrain;
-    private float grassScale = 64;
-    private float dirtScale = 16;
-    private float rockScale = 128;
-    private boolean usePhysics = true;
-    private boolean physicsAdded = false;
+    final private float grassScale = 64;
+    final private float dirtScale = 16;
+    final private float rockScale = 128;
+    final private boolean usePhysics = true;
+    final private boolean physicsAdded = false;
 
     public static void main(final String[] args) {
         TerrainGridTileLoaderTest app = new TerrainGridTileLoaderTest();

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTest.java

@@ -188,7 +188,7 @@ public class TerrainTest extends SimpleApplication {
         inputManager.addMapping("triPlanar", new KeyTrigger(KeyInput.KEY_P));
         inputManager.addListener(actionListener, "triPlanar");
     }
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean pressed, float tpf) {

+ 3 - 3
jme3-examples/src/main/java/jme3test/terrain/TerrainTestAdvanced.java

@@ -68,8 +68,8 @@ public class TerrainTestAdvanced extends SimpleApplication {
     private Material matWire;
     private boolean wireframe = false;
     private boolean triPlanar = false;
-    private boolean wardiso = false;
-    private boolean minnaert = false;
+    final private boolean wardiso = false;
+    final private boolean minnaert = false;
     private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;
@@ -249,7 +249,7 @@ public class TerrainTestAdvanced extends SimpleApplication {
         inputManager.addMapping("DetachControl", new KeyTrigger(KeyInput.KEY_0));
         inputManager.addListener(actionListener, "DetachControl");
     }
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean pressed, float tpf) {

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTestAndroid.java

@@ -169,7 +169,7 @@ public class TerrainTestAndroid extends SimpleApplication {
         inputManager.addMapping("triPlanar", new KeyTrigger(KeyInput.KEY_P));
         inputManager.addListener(actionListener, "triPlanar");
     }
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean pressed, float tpf) {

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTestCollision.java

@@ -246,7 +246,7 @@ public class TerrainTestCollision extends SimpleApplication {
         }
     }
 
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String binding, boolean keyPressed, float tpf) {

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

@@ -82,13 +82,13 @@ public class TerrainTestModifyHeight extends SimpleApplication {
     private Material matTerrain;
     private Material matWire;
     private boolean wireframe = false;
-    private boolean triPlanar = false;
-    private boolean wardiso = false;
-    private boolean minnaert = false;
+    final private boolean triPlanar = false;
+    final private boolean wardiso = false;
+    final private boolean minnaert = false;
     private BitmapText hintText;
-    private float grassScale = 64;
-    private float dirtScale = 16;
-    private float rockScale = 128;
+    final private float grassScale = 64;
+    final private float dirtScale = 16;
+    final private float rockScale = 128;
     
     private boolean raiseTerrain = false;
     private boolean lowerTerrain = false;
@@ -192,7 +192,7 @@ public class TerrainTestModifyHeight extends SimpleApplication {
         inputManager.addMapping("Lower", new MouseButtonTrigger(MouseInput.BUTTON_RIGHT));
         inputManager.addListener(actionListener, "Lower");
     }
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean pressed, float tpf) {

+ 6 - 6
jme3-examples/src/main/java/jme3test/terrain/TerrainTestReadWrite.java

@@ -66,9 +66,9 @@ public class TerrainTestReadWrite extends SimpleApplication {
 
     private Terrain terrain;
     private BitmapText hintText;
-    private float grassScale = 64;
-    private float dirtScale = 16;
-    private float rockScale = 128;
+    final private float grassScale = 64;
+    final private float dirtScale = 16;
+    final private float rockScale = 128;
     private Material matTerrain;
     private Material matWire;
 
@@ -195,7 +195,7 @@ public class TerrainTestReadWrite extends SimpleApplication {
         hintText.setText("Hit T to save, and Y to load");
         guiNode.attachChild(hintText);
     }
-    private ActionListener saveActionListener = new ActionListener() {
+    final private ActionListener saveActionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean pressed, float tpf) {
@@ -268,7 +268,7 @@ public class TerrainTestReadWrite extends SimpleApplication {
             }
         }
     }
-    private ActionListener loadActionListener = new ActionListener() {
+    final private ActionListener loadActionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean pressed, float tpf) {
@@ -277,7 +277,7 @@ public class TerrainTestReadWrite extends SimpleApplication {
             }
         }
     };
-    private ActionListener cloneActionListener = new ActionListener() {
+    final private ActionListener cloneActionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean pressed, float tpf) {

+ 9 - 9
jme3-examples/src/main/java/jme3test/terrain/TerrainTestTile.java

@@ -69,11 +69,11 @@ public class TerrainTestTile extends SimpleApplication {
     private Material matTerrain;
     private Material matWire;
     private boolean wireframe = false;
-    private boolean triPlanar = false;
-    private boolean wardiso = false;
-    private boolean minnaert = false;
+    final private boolean triPlanar = false;
+    final private boolean wardiso = false;
+    final private boolean minnaert = false;
     private BitmapText hintText;
-    private float grassScale = 256;
+    final private float grassScale = 256;
     
 
     public static void main(String[] args) {
@@ -145,7 +145,7 @@ public class TerrainTestTile extends SimpleApplication {
         inputManager.addMapping("wireframe", new KeyTrigger(KeyInput.KEY_T));
         inputManager.addListener(actionListener, "wireframe");
     }
-    private ActionListener actionListener = new ActionListener() {
+    final private ActionListener actionListener = new ActionListener() {
 
         @Override
         public void onAction(String name, boolean pressed, float tpf) {
@@ -170,10 +170,10 @@ public class TerrainTestTile extends SimpleApplication {
      */
     private class TiledTerrain extends Node implements Terrain, NeighbourFinder {
 
-        private TerrainQuad terrain1;
-        private TerrainQuad terrain2;
-        private TerrainQuad terrain3;
-        private TerrainQuad terrain4;
+        final private TerrainQuad terrain1;
+        final private TerrainQuad terrain2;
+        final private TerrainQuad terrain3;
+        final private TerrainQuad terrain4;
         
         TiledTerrain() {
             // TERRAIN TEXTURE material

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

@@ -32,11 +32,11 @@ import java.util.List;
  */
 public class TestMultiPostWater extends SimpleApplication {
 
-    private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f);
+    final private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f);
     private WaterFilter water;
     private TerrainQuad terrain;
     private Material matRock;    
-    private static float WATER_HEIGHT = 90;
+    final private static float WATER_HEIGHT = 90;
 
     public static void main(String[] args) {
         TestMultiPostWater app = new TestMultiPostWater();

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

@@ -48,14 +48,14 @@ import java.util.List;
  */
 public class TestPostWater extends SimpleApplication {
 
-    private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f);
+    final private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f);
     private WaterFilter water;
     private TerrainQuad terrain;
     private Material matRock;
     private AudioNode waves;
-    private LowPassFilter underWaterAudioFilter = new LowPassFilter(0.5f, 0.1f);
-    private LowPassFilter underWaterReverbFilter = new LowPassFilter(0.5f, 0.1f);
-    private LowPassFilter aboveWaterAudioFilter = new LowPassFilter(1, 1);
+    final private LowPassFilter underWaterAudioFilter = new LowPassFilter(0.5f, 0.1f);
+    final private LowPassFilter underWaterReverbFilter = new LowPassFilter(0.5f, 0.1f);
+    final private LowPassFilter aboveWaterAudioFilter = new LowPassFilter(1, 1);
 
     public static void main(String[] args) {
         TestPostWater app = new TestPostWater();
@@ -302,7 +302,7 @@ public class TestPostWater extends SimpleApplication {
     //This part is to emulate tides, slightly varrying the height of the water plane
     private float time = 0.0f;
     private float waterHeight = 0.0f;
-    private float initialWaterHeight = 90f;//0.8f;
+    final private float initialWaterHeight = 90f;//0.8f;
     private boolean uw = false;
 
     @Override

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio