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

master
Stephen Gold 5 years ago
parent 60967b9f04
commit 297443ada4
  1. 1
      jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java
  2. 1
      jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java
  3. 1
      jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java
  4. 1
      jme3-core/src/main/java/com/jme3/anim/AnimComposer.java
  5. 1
      jme3-core/src/main/java/com/jme3/anim/Armature.java
  6. 1
      jme3-core/src/main/java/com/jme3/anim/Joint.java
  7. 1
      jme3-core/src/main/java/com/jme3/animation/AnimControl.java
  8. 1
      jme3-core/src/main/java/com/jme3/animation/TrackInfo.java
  9. 1
      jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java
  10. 1
      jme3-core/src/main/java/com/jme3/cinematic/KeyFrame.java
  11. 1
      jme3-core/src/main/java/com/jme3/cinematic/TimeLine.java
  12. 1
      jme3-core/src/main/java/com/jme3/light/LightList.java
  13. 1
      jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java
  14. 1
      jme3-core/src/main/java/com/jme3/material/TechniqueDef.java
  15. 1
      jme3-core/src/main/java/com/jme3/math/Spline.java
  16. 1
      jme3-core/src/main/java/com/jme3/scene/AssetLinkNode.java
  17. 2
      jme3-core/src/main/java/com/jme3/scene/Mesh.java
  18. 2
      jme3-core/src/main/java/com/jme3/scene/Node.java
  19. 1
      jme3-core/src/main/java/com/jme3/shader/ShaderNode.java
  20. 1
      jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java
  21. 1
      jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java
  22. 1
      jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java
  23. 1
      jme3-jbullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save