aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classes/share/javax/media/j3d/GroupRetained.java3
-rw-r--r--src/classes/share/javax/media/j3d/Locale.java10
-rw-r--r--src/classes/share/javax/media/j3d/SetLiveState.java6
3 files changed, 9 insertions, 10 deletions
diff --git a/src/classes/share/javax/media/j3d/GroupRetained.java b/src/classes/share/javax/media/j3d/GroupRetained.java
index e2489eb..84a6bc6 100644
--- a/src/classes/share/javax/media/j3d/GroupRetained.java
+++ b/src/classes/share/javax/media/j3d/GroupRetained.java
@@ -1641,8 +1641,7 @@ synchronized void setAltAppScope() {
int sz = s.behaviorNodes.size();
for (int i=0; i < sz; i++) {
- BehaviorRetained b;
- b = (BehaviorRetained)s.behaviorNodes.get(i);
+ BehaviorRetained b = s.behaviorNodes.get(i);
b.executeInitialize();
}
diff --git a/src/classes/share/javax/media/j3d/Locale.java b/src/classes/share/javax/media/j3d/Locale.java
index 4187455..4da6c4a 100644
--- a/src/classes/share/javax/media/j3d/Locale.java
+++ b/src/classes/share/javax/media/j3d/Locale.java
@@ -260,8 +260,7 @@ Vector<BranchGroup> branchGroups = new Vector<BranchGroup>();
int sz = s.behaviorNodes.size();
for (int i=0; i< sz; i++) {
- BehaviorRetained b;
- b = (BehaviorRetained)s.behaviorNodes.get(i);
+ BehaviorRetained b = s.behaviorNodes.get(i);
b.executeInitialize();
}
@@ -535,15 +534,16 @@ Vector<BranchGroup> branchGroups = new Vector<BranchGroup>();
}
VirtualUniverse.mc.processMessage(createMessage);
- Object behaviorNodes[] = universe.setLiveState.behaviorNodes.toArray();
+ BehaviorRetained[] behavNodes = new BehaviorRetained[universe.setLiveState.behaviorNodes.size()];
+ behavNodes = universe.setLiveState.behaviorNodes.toArray(behavNodes);
if (universe.isEmpty()) {
VirtualUniverse.mc.postRequest(MasterControl.EMPTY_UNIVERSE,
universe);
}
- for (int i=0; i< behaviorNodes.length; i++) {
- ((BehaviorRetained) behaviorNodes[i]).executeInitialize();
+ for (int i=0; i< behavNodes.length; i++) {
+ behavNodes[i].executeInitialize();
}
createMessage = new J3dMessage();
diff --git a/src/classes/share/javax/media/j3d/SetLiveState.java b/src/classes/share/javax/media/j3d/SetLiveState.java
index dcb306d..42ee62a 100644
--- a/src/classes/share/javax/media/j3d/SetLiveState.java
+++ b/src/classes/share/javax/media/j3d/SetLiveState.java
@@ -147,8 +147,8 @@ ArrayList<BranchGroupRetained[]> parentBranchGroupPaths = null;
// background node whose geometry branch contains this node
BackgroundRetained geometryBackground = null;
- // behavior nodes
- ArrayList behaviorNodes = new ArrayList(1);
+// behavior nodes
+ArrayList<BehaviorRetained> behaviorNodes = new ArrayList<BehaviorRetained>(1);
// The current list of child transform group nodes or link nodes
// under a transform group
@@ -221,7 +221,7 @@ ArrayList<SwitchState> switchStates = null;
changedViewList = null;
keyList = null;
- behaviorNodes.clear();
+ behaviorNodes.clear();
traverseFlags = 0;
ogList.clear();