From: Gerardo H. <ma...@us...> - 2007-03-01 00:50:58
|
Update of /cvsroot/jrman/drafts/src/org/jrman/attributes In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1255/src/org/jrman/attributes Modified Files: Attributes.java Basis.java GeometricApproximation.java MutableAttributes.java Orientation.java ShadingInterpolation.java SolidOperation.java TextureCoordinates.java TrimCurveSense.java Log Message: Compiles for Java 1.5 with -Xlint without any warning. Index: TrimCurveSense.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/TrimCurveSense.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TrimCurveSense.java 26 Feb 2007 19:35:46 -0000 1.2 --- TrimCurveSense.java 1 Mar 2007 00:50:23 -0000 1.3 *************** *** 29,33 **** public static final TrimCurveSense INSIDE = new TrimCurveSense("inside"); ! private final static Map map = new HashMap(); static { --- 29,34 ---- public static final TrimCurveSense INSIDE = new TrimCurveSense("inside"); ! private final static Map<String, TrimCurveSense> map = ! new HashMap<String, TrimCurveSense>(); static { *************** *** 43,47 **** public static TrimCurveSense getNamed(String name) { ! TrimCurveSense result = (TrimCurveSense) TrimCurveSense.map.get(name); if (result == null) throw new IllegalArgumentException("No such sense: " + name); --- 44,48 ---- public static TrimCurveSense getNamed(String name) { ! TrimCurveSense result = TrimCurveSense.map.get(name); if (result == null) throw new IllegalArgumentException("No such sense: " + name); Index: MutableAttributes.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/MutableAttributes.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MutableAttributes.java 26 Feb 2007 19:35:46 -0000 1.11 --- MutableAttributes.java 1 Mar 2007 00:50:23 -0000 1.12 *************** *** 30,33 **** --- 30,34 ---- import org.jrman.geom.Transform; import org.jrman.shaders.DisplacementShader; + import org.jrman.shaders.LightShader; import org.jrman.shaders.SurfaceShader; import org.jrman.shaders.VolumeShader; *************** *** 37,40 **** --- 38,42 ---- private boolean modified; + @SuppressWarnings("unchecked") public MutableAttributes() { color = new Color3f(1f, 1f, 1f); *************** *** 95,100 **** } ! public void setLightSources(Set lightSources) { ! this.lightSources = new HashSet(lightSources); modified = true; } --- 97,102 ---- } ! public void setLightSources(Set<LightShader> lightSources) { ! this.lightSources = new HashSet<LightShader>(lightSources); modified = true; } Index: SolidOperation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/SolidOperation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SolidOperation.java 26 Feb 2007 19:35:46 -0000 1.2 --- SolidOperation.java 1 Mar 2007 00:50:23 -0000 1.3 *************** *** 37,41 **** new SolidOperation("difference"); ! private static Map map = new HashMap(); static { --- 37,42 ---- new SolidOperation("difference"); ! private static Map<String, SolidOperation> map = ! new HashMap<String, SolidOperation>(); static { *************** *** 53,57 **** public static SolidOperation getNamed(String name){ ! SolidOperation result = (SolidOperation) map.get(name); if (result == null) throw new IllegalArgumentException("No such solid operation: " + --- 54,58 ---- public static SolidOperation getNamed(String name){ ! SolidOperation result = map.get(name); if (result == null) throw new IllegalArgumentException("No such solid operation: " + Index: Basis.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/Basis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Basis.java 26 Feb 2007 19:35:46 -0000 1.3 --- Basis.java 1 Mar 2007 00:50:23 -0000 1.4 *************** *** 67,71 **** 0f, 0f, 0f, 1f)); ! private static final Map map = new HashMap(); static { --- 67,71 ---- 0f, 0f, 0f, 1f)); ! private static final Map<String, Basis> map = new HashMap<String, Basis>(); static { *************** *** 86,90 **** public static Basis getNamed(String name) { ! Basis result = (Basis) map.get(name); if (result == null) throw new IllegalArgumentException("No such basis: " + name); --- 86,90 ---- public static Basis getNamed(String name) { ! Basis result = map.get(name); if (result == null) throw new IllegalArgumentException("No such basis: " + name); Index: Attributes.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/Attributes.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Attributes.java 26 Feb 2007 19:35:46 -0000 1.9 --- Attributes.java 1 Mar 2007 00:50:23 -0000 1.10 *************** *** 41,45 **** protected TextureCoordinates textureCoordinates; ! protected Set lightSources; protected LightShader[] lightSourcesArray; --- 41,45 ---- protected TextureCoordinates textureCoordinates; ! protected Set<LightShader> lightSources; protected LightShader[] lightSourcesArray; *************** *** 143,147 **** } ! public Set getLightSources() { // return Collections.unmodifiableSet(lightSources); return lightSources; --- 143,147 ---- } ! public Set<LightShader> getLightSources() { // return Collections.unmodifiableSet(lightSources); return lightSources; Index: GeometricApproximation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/GeometricApproximation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GeometricApproximation.java 26 Feb 2007 19:35:46 -0000 1.2 --- GeometricApproximation.java 1 Mar 2007 00:50:23 -0000 1.3 *************** *** 34,38 **** new GeometricApproximation.Type("flatness"); ! private final static Map map = new HashMap(); static { --- 34,39 ---- new GeometricApproximation.Type("flatness"); ! private final static Map<String, Type> map = ! new HashMap<String, Type>(); static { *************** *** 47,52 **** public static GeometricApproximation.Type getNamed(String name) { ! GeometricApproximation.Type result = ! (GeometricApproximation.Type) Type.map.get(name); if (result == null) throw new IllegalArgumentException("No such approximation type: " --- 48,52 ---- public static GeometricApproximation.Type getNamed(String name) { ! GeometricApproximation.Type result = Type.map.get(name); if (result == null) throw new IllegalArgumentException("No such approximation type: " Index: TextureCoordinates.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/TextureCoordinates.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TextureCoordinates.java 26 Feb 2007 19:35:46 -0000 1.2 --- TextureCoordinates.java 1 Mar 2007 00:50:23 -0000 1.3 *************** *** 38,49 **** private float t4; ! public TextureCoordinates(float s1, ! float t1, ! float s2, ! float t2, ! float s3, ! float t3, ! float s4, ! float t4) { this.s1 = s1; this.t1 = t1; --- 38,45 ---- private float t4; ! public TextureCoordinates(float s1, float t1, ! float s2, float t2, ! float s3, float t3, ! float s4, float t4) { this.s1 = s1; this.t1 = t1; Index: Orientation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/Orientation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Orientation.java 26 Feb 2007 19:35:46 -0000 1.2 --- Orientation.java 1 Mar 2007 00:50:23 -0000 1.3 *************** *** 33,37 **** public static final Orientation RH = new Orientation("rh"); ! private final static Map map = new HashMap(); static { --- 33,38 ---- public static final Orientation RH = new Orientation("rh"); ! private final static Map<String, Orientation> map = ! new HashMap<String, Orientation>(); static { *************** *** 49,53 **** public static Orientation getNamed(String name) { ! Orientation result = (Orientation) Orientation.map.get(name); if (result == null) throw new IllegalArgumentException("No such orientation: " + name); --- 50,54 ---- public static Orientation getNamed(String name) { ! Orientation result = Orientation.map.get(name); if (result == null) throw new IllegalArgumentException("No such orientation: " + name); Index: ShadingInterpolation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/ShadingInterpolation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ShadingInterpolation.java 26 Feb 2007 19:35:46 -0000 1.2 --- ShadingInterpolation.java 1 Mar 2007 00:50:23 -0000 1.3 *************** *** 31,35 **** new ShadingInterpolation("smooth"); ! private final static Map map = new HashMap(); static { --- 31,36 ---- new ShadingInterpolation("smooth"); ! private final static Map<String, ShadingInterpolation> map = ! new HashMap<String, ShadingInterpolation>(); static { *************** *** 45,50 **** public static ShadingInterpolation getNamed(String name) { ! ShadingInterpolation result = (ShadingInterpolation) ! ShadingInterpolation.map.get(name); if (result == null) throw new IllegalArgumentException("No such shading interpolation: " --- 46,50 ---- public static ShadingInterpolation getNamed(String name) { ! ShadingInterpolation result = ShadingInterpolation.map.get(name); if (result == null) throw new IllegalArgumentException("No such shading interpolation: " |