Bug 1349

Summary: Remove deprecated methods, use try with resource, generics and return type refinement in Java3D 1.7
Product: Java3D Reporter: Julien Gouesse <gouessej>
Component: coreAssignee: Phil Jordan <p.j.nz>
Status: UNCONFIRMED ---    
Severity: normal CC: gouessej
Priority: P4    
Version: tbd   
Hardware: All   
OS: all   
Type: FEATURE SCM Refs:
Workaround: ---

Description Julien Gouesse 2016-11-23 17:13:48 CET
The deprecated classes and methods should be removed from the latest major version of Java3D.

The classes and/or methods relying on deprecated classes and/or methods (for example the classes of the applets deprecated and marked for removal in Java 1.9) should be marked as deprecated as well.

The try with resource should be used as Java3D 1.7 is allowed to rely on Java 1.7 features and it can improve resource management and source code readability. We might refrain us from using those features if it's annoying to support Android.

The numerous implementations of the clone() method can benefit of return type refinement.

There are numerous methods returning "raw" enumerations and using "raw" types whereas using generics would avoid some useless casts in the source code of the callers:
http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/View.html#getAllCanvas3Ds()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/ViewSpecificGroup.html#getAllViews()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/VirtualUniverse.html#getAllLocales()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/WakeupCondition.html#allElements()

http://download.java.net/media/java3d/javadoc/1.5.2/com/sun/j3d/loaders/Scene.html#getNamedObjects()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/Shape3D.html#getAllGeometries()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/LOD.html#getAllSwitches()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/ModelClip.html#getAllScopes()

http://download.java.net/media/java3d/javadoc/1.5.2/com/sun/j3d/utils/behaviors/mouse/MouseBehavior.html#mouseq

http://download.java.net/media/java3d/javadoc/1.5.2/com/sun/j3d/utils/behaviors/mouse/MouseBehavior.html#processStimulus(java.util.Enumeration)

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/Locale.html#getAllBranchGraphs()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/GraphicsContext3D.html#getAllLights()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/GraphicsContext3D.html#getAllSounds()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/Fog.html#getAllScopes()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/Light.html#getAllScopes()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/AlternateAppearance.html#getAllScopes()

http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/Group.html#getAllChildren()

http://download.java.net/media/java3d/javadoc/1.5.2/com/sun/j3d/utils/geometry/GeometryInfo.html#getTextureCoordinates(int)

http://download.java.net/media/java3d/javadoc/1.5.2/com/sun/j3d/utils/geometry/GeometryInfo.html#getColors()