diff options
-rw-r--r-- | src/classes/share/javax/media/j3d/GeometryArrayRetained.java | 5 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/SwitchRetained.java | 3 |
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 |