aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/share
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/share')
-rw-r--r--src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java42
1 files changed, 15 insertions, 27 deletions
diff --git a/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java b/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java
index 7b116ce..1de685b 100644
--- a/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java
+++ b/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java
@@ -116,8 +116,8 @@ int numberOfClips = 0;
ArrayList xformChangeList = new ArrayList();
- // freelist management of objects
- ArrayList objFreeList = new ArrayList();
+// freelist management of objects
+private final ArrayList<Object[]> objFreeList = new ArrayList<Object[]>();
LightRetained[] retlights = new LightRetained[5];
@@ -142,33 +142,21 @@ int numberOfClips = 0;
}
- /**
- * Returns a object array of length 5 to save the 5 objects in the message list.
- */
- Object[] getObjectArray() {
- Object[] objs;
- int size;
-
- size = objFreeList.size();
- if (size == 0) {
- objs = new Object[5];
- }
- else {
- objs = (Object[]) objFreeList.get(size - 1);
- objFreeList.remove(size -1);
- }
- return objs;
- }
-
- void addObjArrayToFreeList(Object[] objs) {
- int i;
-
- for (i = 0; i < objs.length; i++)
- objs[i] = null;
+/**
+ * Returns a object array of length 5 to save the 5 objects in the message list.
+ */
+Object[] getObjectArray() {
+ int size = objFreeList.size();
+ if (size == 0)
+ return new Object[5];
+
+ return objFreeList.remove(size - 1);
+}
+void addObjArrayToFreeList(Object[] objs) {
+ Arrays.fill(objs, null);
objFreeList.add(objs);
- }
-
+}
public void updateObject() {