summaryrefslogtreecommitdiffstats
path: root/src/classes
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-07-01 14:25:32 -0700
committerHarvey Harrison <[email protected]>2013-07-01 14:25:32 -0700
commit267f859834bbbe3febd64feb53bfbd243e43382e (patch)
treeebeb3a29869adbedd117eb520ff23a20b801bbb4 /src/classes
parent1bdd68a95ba30896c5713a0b5689635ffc8dcc1f (diff)
j3dcore: use Arrays.copyOf instead of clone on an int[]
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes')
-rw-r--r--src/classes/share/javax/media/j3d/GeometryArrayRetained.java5
-rw-r--r--src/classes/share/javax/media/j3d/SwitchRetained.java3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
index d037c4f..f4d20fa 100644
--- a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
@@ -31,6 +31,7 @@ import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
@@ -1596,7 +1597,7 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
this.texCoordSetMap = null;
}
else {
- this.texCoordSetMap = (int[])texCoordSetMap.clone();
+ this.texCoordSetMap = Arrays.copyOf(texCoordSetMap, texCoordSetMap.length);
}
this.vertexAttrCount = vertexAttrCount;
@@ -1604,7 +1605,7 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
this.vertexAttrSizes = null;
}
else {
- this.vertexAttrSizes = (int[])vertexAttrSizes.clone();
+ this.vertexAttrSizes = Arrays.copyOf(vertexAttrSizes, vertexAttrSizes.length);
}
this.vertexAttrStride = this.vertexAttrStride();
diff --git a/src/classes/share/javax/media/j3d/SwitchRetained.java b/src/classes/share/javax/media/j3d/SwitchRetained.java
index c82d810..1a79136 100644
--- a/src/classes/share/javax/media/j3d/SwitchRetained.java
+++ b/src/classes/share/javax/media/j3d/SwitchRetained.java
@@ -27,6 +27,7 @@
package javax.media.j3d;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.BitSet;
/**
@@ -357,7 +358,7 @@ void updateSwitchChild(int child, boolean switchOn, ArrayList<SwitchState> updat
// update setLiveState for this node
s.closestSwitchParents = (SwitchRetained[])
savedClosestSwitchParents.clone();
- s.closestSwitchIndices = (int[])savedClosestSwitchIndices.clone();
+ s.closestSwitchIndices = Arrays.copyOf(savedClosestSwitchIndices, savedClosestSwitchIndices.length);
// Note that s.containsNodesList is updated in super.setLive
// Note that s.closestSwitchIndices is updated in super.setLive