ソースを参照

suppress javac warnings about unchecked casts in read() and write()

Stephen Gold 5 年 前
コミット
297443ada4
23 ファイル変更25 行追加0 行削除
  1. 1 0
      jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java
  2. 1 0
      jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java
  3. 1 0
      jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java
  4. 1 0
      jme3-core/src/main/java/com/jme3/anim/AnimComposer.java
  5. 1 0
      jme3-core/src/main/java/com/jme3/anim/Armature.java
  6. 1 0
      jme3-core/src/main/java/com/jme3/anim/Joint.java
  7. 1 0
      jme3-core/src/main/java/com/jme3/animation/AnimControl.java
  8. 1 0
      jme3-core/src/main/java/com/jme3/animation/TrackInfo.java
  9. 1 0
      jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java
  10. 1 0
      jme3-core/src/main/java/com/jme3/cinematic/KeyFrame.java
  11. 1 0
      jme3-core/src/main/java/com/jme3/cinematic/TimeLine.java
  12. 1 0
      jme3-core/src/main/java/com/jme3/light/LightList.java
  13. 1 0
      jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java
  14. 1 0
      jme3-core/src/main/java/com/jme3/material/TechniqueDef.java
  15. 1 0
      jme3-core/src/main/java/com/jme3/math/Spline.java
  16. 1 0
      jme3-core/src/main/java/com/jme3/scene/AssetLinkNode.java
  17. 2 0
      jme3-core/src/main/java/com/jme3/scene/Mesh.java
  18. 2 0
      jme3-core/src/main/java/com/jme3/scene/Node.java
  19. 1 0
      jme3-core/src/main/java/com/jme3/shader/ShaderNode.java
  20. 1 0
      jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java
  21. 1 0
      jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java
  22. 1 0
      jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java
  23. 1 0
      jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java

+ 1 - 0
jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java

@@ -166,6 +166,7 @@ public class CompoundCollisionShape extends CollisionShape {
      * @throws IOException from importer
      */
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         super.read(im);
         InputCapsule capsule = im.getCapsule(this);

+ 1 - 0
jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java

@@ -1045,6 +1045,7 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
      * @throws IOException from importer
      */
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter e) throws IOException {
         super.read(e);
 

+ 1 - 0
jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java

@@ -643,6 +643,7 @@ public class PhysicsVehicle extends PhysicsRigidBody {
      * @throws IOException from importer
      */
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule capsule = im.getCapsule(this);
         tuning = new VehicleTuning();

+ 1 - 0
jme3-core/src/main/java/com/jme3/anim/AnimComposer.java

@@ -330,6 +330,7 @@ public class AnimComposer extends AbstractControl {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         super.read(im);
         InputCapsule ic = im.getCapsule(this);

+ 1 - 0
jme3-core/src/main/java/com/jme3/anim/Armature.java

@@ -261,6 +261,7 @@ public class Armature implements JmeCloneable, Savable {
 
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule input = im.getCapsule(this);
 

+ 1 - 0
jme3-core/src/main/java/com/jme3/anim/Joint.java

@@ -333,6 +333,7 @@ public class Joint implements Savable, JmeCloneable, HasLocalTransform {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void write(JmeExporter ex) throws IOException {
         OutputCapsule output = ex.getCapsule(this);
 

+ 1 - 0
jme3-core/src/main/java/com/jme3/animation/AnimControl.java

@@ -365,6 +365,7 @@ public final class AnimControl extends AbstractControl implements Cloneable, Jme
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         super.read(im);
         InputCapsule in = im.getCapsule(this);

+ 1 - 0
jme3-core/src/main/java/com/jme3/animation/TrackInfo.java

@@ -62,6 +62,7 @@ public class TrackInfo implements Savable, JmeCloneable {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule c = im.getCapsule(this);
         tracks = c.readSavableArrayList("tracks", null);

+ 1 - 0
jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java

@@ -234,6 +234,7 @@ public class Cinematic extends AbstractCinematicEvent implements AppState {
      * @throws IOException
      */
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         super.read(im);
         InputCapsule ic = im.getCapsule(this);

+ 1 - 0
jme3-core/src/main/java/com/jme3/cinematic/KeyFrame.java

@@ -77,6 +77,7 @@ public class KeyFrame implements Savable {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule ic = im.getCapsule(this);
         cinematicEvents = ic.readSavableArrayList("cinematicEvents", null);

+ 1 - 0
jme3-core/src/main/java/com/jme3/cinematic/TimeLine.java

@@ -105,6 +105,7 @@ public class TimeLine extends HashMap<Integer, KeyFrame> implements Savable {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void write(JmeExporter ex) throws IOException {
         OutputCapsule oc = ex.getCapsule(this);
         ArrayList list = new ArrayList();

+ 1 - 0
jme3-core/src/main/java/com/jme3/light/LightList.java

@@ -340,6 +340,7 @@ public final class LightList implements Iterable<Light>, Savable, Cloneable, Jme
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule ic = im.getCapsule(this);
 //        owner = (Spatial) ic.readSavable("owner", null);

+ 1 - 0
jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java

@@ -177,6 +177,7 @@ public class ShaderGenerationInfo implements Savable, Cloneable {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule ic = im.getCapsule(this);
         attributes = ic.readSavableArrayList("attributes", new ArrayList<ShaderNodeVariable>());

+ 1 - 0
jme3-core/src/main/java/com/jme3/material/TechniqueDef.java

@@ -682,6 +682,7 @@ public class TechniqueDef implements Savable, Cloneable {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException{
         InputCapsule ic = im.getCapsule(this);
         name = ic.readString("name", null);

+ 1 - 0
jme3-core/src/main/java/com/jme3/math/Spline.java

@@ -455,6 +455,7 @@ public class Spline implements Savable {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule in = im.getCapsule(this);
 

+ 1 - 0
jme3-core/src/main/java/com/jme3/scene/AssetLinkNode.java

@@ -161,6 +161,7 @@ public class AssetLinkNode extends Node {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter e) throws IOException {
         super.read(e);
 

+ 2 - 0
jme3-core/src/main/java/com/jme3/scene/Mesh.java

@@ -1575,6 +1575,7 @@ public class Mesh implements Savable, Cloneable, JmeCloneable {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void write(JmeExporter ex) throws IOException {
         OutputCapsule out = ex.getCapsule(this);
 
@@ -1618,6 +1619,7 @@ public class Mesh implements Savable, Cloneable, JmeCloneable {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule in = im.getCapsule(this);
         meshBound = (BoundingVolume) in.readSavable("modelBound", null);

+ 2 - 0
jme3-core/src/main/java/com/jme3/scene/Node.java

@@ -735,12 +735,14 @@ public class Node extends Spatial {
         this.updateList = cloner.clone(updateList);
     }
     @Override
+    @SuppressWarnings("unchecked")
     public void write(JmeExporter e) throws IOException {
         super.write(e);
         e.getCapsule(this).writeSavableArrayList(new ArrayList(children), "children", null);
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter e) throws IOException {
         // XXX: Load children before loading itself!!
         // This prevents empty children list if controls query

+ 1 - 0
jme3-core/src/main/java/com/jme3/shader/ShaderNode.java

@@ -194,6 +194,7 @@ public class ShaderNode implements Savable, Cloneable {
      * @throws IOException
      */
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule ic = im.getCapsule(this);
         name = ic.readString("name", "");

+ 1 - 0
jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java

@@ -229,6 +229,7 @@ public class ShaderNodeDefinition implements Savable {
      * @throws IOException
      */
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule ic = im.getCapsule(this);
         name = ic.readString("name", "");

+ 1 - 0
jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java

@@ -133,6 +133,7 @@ public class CompoundCollisionShape extends CollisionShape {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         super.read(im);
         InputCapsule capsule = im.getCapsule(this);

+ 1 - 0
jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java

@@ -684,6 +684,7 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
      * @throws IOException from importer
      */
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter e) throws IOException {
         super.read(e);
 

+ 1 - 0
jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java

@@ -477,6 +477,7 @@ public class PhysicsVehicle extends PhysicsRigidBody {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public void read(JmeImporter im) throws IOException {
         InputCapsule capsule = im.getCapsule(this);
         tuning = new VehicleTuning();