From 83e11cb4d5d0021cf949f93cde84be225e044b02 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Wed, 31 Jul 2013 11:14:26 -0700 Subject: j3dcore: annotate the list of mirrorshapes in Shape3DRetained Signed-off-by: Harvey Harrison --- .../share/javax/media/j3d/Shape3DRetained.java | 48 +++++++++++----------- .../share/javax/media/j3d/Text3DRetained.java | 2 +- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/classes/share/javax/media/j3d/Shape3DRetained.java b/src/classes/share/javax/media/j3d/Shape3DRetained.java index f1c44f3..f105e44 100644 --- a/src/classes/share/javax/media/j3d/Shape3DRetained.java +++ b/src/classes/share/javax/media/j3d/Shape3DRetained.java @@ -85,7 +85,7 @@ ArrayList geometryList = null; * Do not change the following private variables to public, its access need to synchronize * via mirrorShape3DLock. */ - ArrayList mirrorShape3D = new ArrayList(1); + ArrayList mirrorShape3D = new ArrayList(1); /** * This field is used for mirror Shape3D nodes accessing their @@ -335,7 +335,7 @@ ArrayList geometryList = null; if (oldGeom != null) { oldGeom.clearLive(refCount); for (i=0; i geometryList = null; oldGeom.clearLive(refCount); oldGeom.decRefCnt(); for (i=0; i msList = new ArrayList(); super.clearLive(s); @@ -1278,10 +1276,10 @@ Enumeration getAllGeometries(int id) { if (inSharedGroup) { synchronized(mirrorShape3D) { - shapes = mirrorShape3D.toArray(); + Shape3DRetained[] shapes = mirrorShape3D.toArray(new Shape3DRetained[mirrorShape3D.size()]); for (i=0; i=0) { - return (Shape3DRetained) mirrorShape3D.get(i); + return mirrorShape3D.get(i); } } // Not possible @@ -2323,7 +2321,7 @@ Enumeration getAllGeometries(int id) { * This is used to send a message of the snapshot of the * geometry atoms that are affected by this change. */ - final static GeometryAtom[] getGeomAtomsArray(ArrayList userList) { + final static GeometryAtom[] getGeomAtomsArray(ArrayList userList) { Shape3DRetained ms = null; GeometryAtom[] gaArr = null; int size, nullCnt=0, i, j; @@ -2332,7 +2330,7 @@ Enumeration getAllGeometries(int id) { size = userList.size(); gaArr = new GeometryAtom[size]; for (i = 0; i < size; i++) { - ms = (Shape3DRetained) userList.get(i); + ms = userList.get(i); ms.mirrorShape3DLock.readLock(); if(ms.geomAtom == null) { nullCnt++; @@ -2731,7 +2729,7 @@ final static ArrayList> getGeomAtomsList(ArrayList userL oldGeom.clearLive(refCount); oldGeom.decRefCnt(); for (i=0; i