suppress more javac warnings about unchecked casts
This commit is contained in:
parent
88c9371a4d
commit
822bcd1300
@ -438,6 +438,7 @@ public class Tweens {
|
||||
this.method.setAccessible(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static Method findMethod(Class type, String name, Object... args) {
|
||||
for (Method m : type.getDeclaredMethods()) {
|
||||
if (!Objects.equals(m.getName(), name)) {
|
||||
|
@ -718,6 +718,7 @@ public class LegacyApplication implements Application, SystemListener {
|
||||
* @param runnable The runnable to run in the main jME3 thread
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void enqueue(Runnable runnable){
|
||||
enqueue(new RunnableWrapper(runnable));
|
||||
}
|
||||
|
@ -242,6 +242,7 @@ public class AppStateManager {
|
||||
* @return First attached state that is an instance of stateClass. If failOnMiss is true
|
||||
* then an IllegalArgumentException is thrown if the state is not attached.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends AppState> T getState(Class<T> stateClass, boolean failOnMiss){
|
||||
synchronized (states){
|
||||
AppState[] array = getStates();
|
||||
|
@ -65,6 +65,7 @@ public final class AssetConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void loadText(AssetManager assetManager, URL configUrl) throws IOException{
|
||||
InputStream in = configUrl.openStream();
|
||||
try {
|
||||
|
@ -59,6 +59,7 @@ public class AssetKey<T> implements Savable, Cloneable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public AssetKey<T> clone() {
|
||||
try {
|
||||
return (AssetKey<T>) super.clone();
|
||||
|
@ -56,6 +56,7 @@ public class SimpleAssetCache implements AssetCache {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getFromCache(AssetKey<T> key) {
|
||||
return (T) keyToAssetMap.get(key);
|
||||
}
|
||||
|
@ -95,6 +95,7 @@ public class WeakRefAssetCache implements AssetCache {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getFromCache(AssetKey<T> key) {
|
||||
AssetRef ref = assetCache.get(key);
|
||||
if (ref != null){
|
||||
|
@ -157,6 +157,7 @@ public class WeakRefCloneAssetCache implements AssetCache {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getFromCache(AssetKey<T> key) {
|
||||
AssetRef smartInfo = smartCache.get(key);
|
||||
if (smartInfo == null) {
|
||||
|
@ -284,6 +284,7 @@ public class AnimationEvent extends AbstractCinematicEvent {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initEvent(Application app, Cinematic cinematic) {
|
||||
super.initEvent(app, cinematic);
|
||||
this.cinematic = cinematic;
|
||||
@ -451,6 +452,7 @@ public class AnimationEvent extends AbstractCinematicEvent {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
if (cinematic != null) {
|
||||
|
@ -368,6 +368,7 @@ public class EnvironmentCamera extends BaseAppState {
|
||||
JobProgressListener<TextureCubeMap> callback;
|
||||
Spatial scene;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public SnapshotJob(JobProgressListener callback, Spatial scene) {
|
||||
this.callback = callback;
|
||||
this.scene = scene;
|
||||
|
@ -101,6 +101,7 @@ public class IrradianceSphericalHarmonicsGenerator extends RunnableWithProgress
|
||||
app.enqueue(new Callable<Void>() {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Void call() throws Exception {
|
||||
listener.done(6);
|
||||
return null;
|
||||
|
@ -137,6 +137,7 @@ public class PrefilteredEnvMapFaceGenerator extends RunnableWithProgress {
|
||||
app.enqueue(new Callable<Void>() {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Void call() throws Exception {
|
||||
listener.done(face);
|
||||
return null;
|
||||
|
@ -90,6 +90,7 @@ public class SavableClassUtil {
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static int[] getSavableVersions(Class<? extends Savable> clazz) throws IOException{
|
||||
ArrayList<Integer> versionList = new ArrayList<Integer>();
|
||||
Class superclass = clazz;
|
||||
@ -105,6 +106,7 @@ public class SavableClassUtil {
|
||||
return versions;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static int getSavableVersion(Class<? extends Savable> clazz) throws IOException{
|
||||
try {
|
||||
Field field = clazz.getField("SAVABLE_VERSION");
|
||||
@ -221,6 +223,7 @@ public class SavableClassUtil {
|
||||
*
|
||||
* @return the pre-existing constructor (not null)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private static Constructor findNoArgConstructor(String className)
|
||||
throws ClassNotFoundException, InstantiationException {
|
||||
Class clazz = Class.forName(className);
|
||||
|
@ -551,6 +551,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void write(JmeExporter ex) throws IOException {
|
||||
OutputCapsule oc = ex.getCapsule(this);
|
||||
oc.write(numSamples, "numSamples", 0);
|
||||
@ -558,6 +559,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void read(JmeImporter im) throws IOException {
|
||||
InputCapsule ic = im.getCapsule(this);
|
||||
numSamples = ic.readInt("numSamples", 0);
|
||||
@ -593,6 +595,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
|
||||
* @param filterType the filter type
|
||||
* @return a filter assignable form the given type
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends Filter> T getFilter(Class<T> filterType) {
|
||||
for (Filter c : filters.getArray()) {
|
||||
if (filterType.isAssignableFrom(c.getClass())) {
|
||||
|
@ -62,6 +62,7 @@ public class GLTiming implements InvocationHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
String methodName = method.getName();
|
||||
if (methodName.equals("resetStats")) {
|
||||
|
@ -149,6 +149,7 @@ public class GeometryList implements Iterable<Geometry>{
|
||||
/**
|
||||
* Sorts the elements in the list according to their Comparator.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void sort() {
|
||||
if (size > 1) {
|
||||
// sort the spatial list using the comparator
|
||||
|
@ -837,6 +837,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
|
||||
*
|
||||
* @see Spatial#addControl(com.jme3.scene.control.Control)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends Control> T getControl(Class<T> controlType) {
|
||||
for (Control c : controls.getArray()) {
|
||||
if (controlType.isAssignableFrom(c.getClass())) {
|
||||
@ -1435,6 +1436,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
|
||||
* Called internally by com.jme3.util.clone.Cloner. Do not call directly.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void cloneFields( Cloner cloner, Object original ) {
|
||||
|
||||
// Clone all of the fields that need fix-ups and/or potential
|
||||
@ -1502,6 +1504,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Collection<String> getUserDataKeys() {
|
||||
if (userData != null) {
|
||||
return userData.keySet();
|
||||
@ -1540,6 +1543,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void write(JmeExporter ex) throws IOException {
|
||||
OutputCapsule capsule = ex.getCapsule(this);
|
||||
capsule.write(name, "name", null);
|
||||
@ -1558,6 +1562,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void read(JmeImporter im) throws IOException {
|
||||
InputCapsule ic = im.getCapsule(this);
|
||||
|
||||
|
@ -375,6 +375,7 @@ public class InstancedGeometry extends Geometry {
|
||||
return geometries;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public VertexBuffer[] getAllInstanceData() {
|
||||
ArrayList<VertexBuffer> allData = new ArrayList();
|
||||
if (transformInstanceData != null) {
|
||||
|
@ -226,6 +226,7 @@ public class BufferObject extends NativeObject {
|
||||
* @param <T> the value's type.
|
||||
* @return the current value.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getFieldValue(final String name) {
|
||||
|
||||
final BufferObjectField field = fields.get(name);
|
||||
@ -492,6 +493,7 @@ public class BufferObject extends NativeObject {
|
||||
* @param data the data buffer.
|
||||
* @param value the value.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void writeMat3Array(final ByteBuffer data, final Object value) {
|
||||
|
||||
if (value instanceof Matrix3f[]) {
|
||||
@ -523,6 +525,7 @@ public class BufferObject extends NativeObject {
|
||||
* @param data the data buffer.
|
||||
* @param value the value.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void writeMat4Array(final ByteBuffer data, final Object value) {
|
||||
|
||||
if (value instanceof Matrix4f[]) {
|
||||
@ -555,6 +558,7 @@ public class BufferObject extends NativeObject {
|
||||
* @param data the data buffer.
|
||||
* @param value the value.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void writeVec4Array(final ByteBuffer data, final Object value) {
|
||||
|
||||
if (value instanceof Object[]) {
|
||||
@ -586,6 +590,7 @@ public class BufferObject extends NativeObject {
|
||||
* @param data the data buffer.
|
||||
* @param value the value.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void writeVec3Array(final ByteBuffer data, final Object value) {
|
||||
|
||||
if (value instanceof Vector3f[]) {
|
||||
@ -617,6 +622,7 @@ public class BufferObject extends NativeObject {
|
||||
* @param data the data buffer.
|
||||
* @param value the value.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void writeVec2Array(final ByteBuffer data, final Object value) {
|
||||
|
||||
if (value instanceof Vector2f[]) {
|
||||
|
@ -194,6 +194,7 @@ public abstract class ShaderGenerator {
|
||||
* @param info the ShaderGenerationInfo
|
||||
* @param type the Shader type
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void generateDeclarationAndMainBody(List<ShaderNode> shaderNodes, StringBuilder sourceDeclaration, StringBuilder source, ShaderGenerationInfo info, Shader.ShaderType type) {
|
||||
for (ShaderNode shaderNode : shaderNodes) {
|
||||
if (info.getUnusedNodes().contains(shaderNode.getName())) {
|
||||
|
@ -328,6 +328,7 @@ public abstract class AbstractShadowFilter<T extends AbstractShadowRenderer> ext
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public AbstractShadowFilter<T> jmeClone() {
|
||||
try {
|
||||
return (AbstractShadowFilter<T>) super.clone();
|
||||
|
@ -80,6 +80,7 @@ public final class IntMap<T> implements Iterable<Entry<T>>, Cloneable, JmeClonea
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public IntMap<T> clone(){
|
||||
try{
|
||||
IntMap<T> clone = (IntMap<T>) super.clone();
|
||||
@ -137,6 +138,7 @@ public final class IntMap<T> implements Iterable<Entry<T>>, Cloneable, JmeClonea
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public T get(int key) {
|
||||
int index = key & mask;
|
||||
for (Entry e = table[index]; e != null; e = e.next){
|
||||
@ -147,6 +149,7 @@ public final class IntMap<T> implements Iterable<Entry<T>>, Cloneable, JmeClonea
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public T put(int key, T value) {
|
||||
int index = key & mask;
|
||||
// Check if key already exists.
|
||||
@ -186,6 +189,7 @@ public final class IntMap<T> implements Iterable<Entry<T>>, Cloneable, JmeClonea
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public T remove(int key) {
|
||||
int index = key & mask;
|
||||
Entry prev = table[index];
|
||||
@ -320,6 +324,7 @@ public final class IntMap<T> implements Iterable<Entry<T>>, Cloneable, JmeClonea
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Entry<T> clone(){
|
||||
try{
|
||||
Entry<T> clone = (Entry<T>) super.clone();
|
||||
|
@ -74,6 +74,7 @@ public final class ListMap<K, V> extends AbstractMap<K, V> implements Cloneable,
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
@ -103,18 +104,21 @@ public final class ListMap<K, V> extends AbstractMap<K, V> implements Cloneable,
|
||||
|
||||
// private final ArrayList<ListMapEntry<K,V>> entries;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ListMap(){
|
||||
entries = new ListMapEntry[4];
|
||||
backingMap = new HashMap<K, V>(4);
|
||||
// entries = new ArrayList<ListMapEntry<K,V>>();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ListMap(int initialCapacity){
|
||||
entries = new ListMapEntry[initialCapacity];
|
||||
backingMap = new HashMap<K, V>(initialCapacity);
|
||||
// entries = new ArrayList<ListMapEntry<K, V>>(initialCapacity);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ListMap(Map<? extends K, ? extends V> map){
|
||||
entries = new ListMapEntry[map.size()];
|
||||
backingMap = new HashMap<K, V>(map.size());
|
||||
@ -195,6 +199,7 @@ public final class ListMap<K, V> extends AbstractMap<K, V> implements Cloneable,
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public V put(K key, V value) {
|
||||
if (backingMap.containsKey(key)){
|
||||
// set the value on the entry
|
||||
|
@ -131,6 +131,7 @@ public class ListSort<T> {
|
||||
*
|
||||
* @param len
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public final void allocateStack(int len) {
|
||||
|
||||
length = len;
|
||||
@ -995,6 +996,7 @@ public class ListSort<T> {
|
||||
/*
|
||||
* test case
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void main(String[] argv) {
|
||||
Integer[] arr = new Integer[]{5, 6, 2, 9, 10, 11, 12, 8, 3, 12, 3, 7, 12, 32, 458, 12, 5, 3, 78, 45, 12, 32, 58, 45, 65, 45, 98, 45, 65, 2, 3, 47, 21, 35};
|
||||
ListSort ls = new ListSort();
|
||||
|
@ -299,6 +299,7 @@ public class MaterialDebugAppState extends AbstractAppState {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void reload() {
|
||||
Field[] fields1 = filter.getClass().getDeclaredFields();
|
||||
Field[] fields2 = filter.getClass().getSuperclass().getDeclaredFields();
|
||||
|
@ -104,6 +104,7 @@ public class SafeArrayList<E> implements List<E>, Cloneable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public SafeArrayList<E> clone() {
|
||||
try {
|
||||
SafeArrayList<E> clone = (SafeArrayList<E>)super.clone();
|
||||
@ -122,6 +123,7 @@ public class SafeArrayList<E> implements List<E>, Cloneable {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected final <T> T[] createArray(Class<T> type, int size) {
|
||||
return (T[])java.lang.reflect.Array.newInstance(type, size);
|
||||
}
|
||||
@ -194,6 +196,7 @@ public class SafeArrayList<E> implements List<E>, Cloneable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T[] toArray(T[] a) {
|
||||
|
||||
E[] array = getArray();
|
||||
|
@ -73,6 +73,7 @@ public class SortUtil {
|
||||
end procedure
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void gsort(Object[] a, Comparator comp) {
|
||||
int pos = 1;
|
||||
int last = 0;
|
||||
@ -241,6 +242,7 @@ end procedure
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void qsort(int[] a, int lo0, int hi0, Comparator comp) {
|
||||
// bail out if we're already done
|
||||
if (hi0 <= lo0) {
|
||||
@ -324,6 +326,7 @@ end procedure
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static void merge(Object[] src, Object[] dest,
|
||||
int low, int middle, int high, Comparator comp) {
|
||||
int leftEnd = middle - 1;
|
||||
|
@ -46,6 +46,7 @@ public class J3MLoaderTest {
|
||||
private MaterialDef materialDef;
|
||||
|
||||
@Before
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setUp() throws Exception {
|
||||
when(assetKey.getExtension()).thenReturn(".j3m");
|
||||
when(assetInfo.getManager()).thenReturn(assetManager);
|
||||
|
@ -348,6 +348,7 @@ public class TextureAtlas {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Image convertImageToAwt(Image source) {
|
||||
//use awt dependent classes without actual dependency via reflection
|
||||
try {
|
||||
|
@ -261,6 +261,7 @@ public class JmeDesktopSystem extends JmeSystemDelegate {
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> T newObject(String className) {
|
||||
try {
|
||||
Class<T> clazz = (Class<T>) Class.forName(className);
|
||||
|
@ -260,6 +260,7 @@ public class OGGLoader implements AssetLoader {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private AudioData load(InputStream in, boolean readStream, boolean streamCache) throws IOException{
|
||||
if (readStream && streamCache){
|
||||
oggStream = new CachedOggStream(in);
|
||||
|
@ -288,6 +288,7 @@ public abstract class LwjglContext implements JmeContext {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void initOpenCL(final long window) {
|
||||
logger.info("Initialize OpenCL with LWJGL3");
|
||||
|
||||
|
@ -47,6 +47,7 @@ public class Filters
|
||||
* Creates a filter that returns true for any value in the specified
|
||||
* list of values and false for all other cases.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Filter<T> in( T... values )
|
||||
{
|
||||
return in( new HashSet<T>(Arrays.asList(values)) );
|
||||
@ -66,6 +67,7 @@ public class Filters
|
||||
* list of values and false for all other cases. This is the equivalent
|
||||
* of calling not(in(values)).
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Filter<T> notIn( T... values )
|
||||
{
|
||||
return not( in( values ) );
|
||||
|
@ -410,6 +410,7 @@ public class DefaultClient implements Client
|
||||
* Either calls the ErrorListener or closes the connection
|
||||
* if there are no listeners.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void handleError( Throwable t )
|
||||
{
|
||||
// If there are no listeners then close the connection with
|
||||
|
@ -129,6 +129,7 @@ public class ObjectStore {
|
||||
Serializer.registerClass(RemoteMethodReturnMessage.class, s);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ObjectStore(Client client) {
|
||||
this.client = client;
|
||||
client.addMessageListener(clientEventHandler,
|
||||
@ -187,6 +188,7 @@ public class ObjectStore {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getExposedObject(String name, Class<T> type, boolean waitFor) throws InterruptedException{
|
||||
RemoteObject ro = remoteObjects.get(name);
|
||||
if (ro == null){
|
||||
|
@ -235,6 +235,7 @@ public class RmiSerializer extends Serializer {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T readObject(ByteBuffer data, Class<T> c) throws IOException {
|
||||
if (c == RemoteObjectDefMessage.class){
|
||||
return (T) readObjectDefs(data);
|
||||
|
@ -55,6 +55,7 @@ public class FieldSerializer extends Serializer {
|
||||
private static Map<Class, SavedField[]> savedFields = new HashMap<Class, SavedField[]>();
|
||||
private static Map<Class, Constructor> savedCtors = new HashMap<Class, Constructor>();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void checkClass(Class clazz) {
|
||||
|
||||
// See if the class has a public no-arg constructor
|
||||
|
@ -60,6 +60,7 @@ public abstract class AbstractService<S extends ServiceManager> implements Servi
|
||||
* Retrieves the first sibling service of the specified
|
||||
* type.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected <T extends Service<S>> T getService( Class<T> type ) {
|
||||
return type.cast(serviceManager.getService(type));
|
||||
}
|
||||
|
@ -160,6 +160,7 @@ public class RmiClientService extends AbstractClientService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void start() {
|
||||
super.start();
|
||||
|
||||
|
@ -180,6 +180,7 @@ public class RmiHostedService extends AbstractHostedService {
|
||||
* This method is called automatically for all new connections if
|
||||
* autohost is set to true.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void startHostingOnConnection( HostedConnection hc ) {
|
||||
if( log.isLoggable(Level.FINEST) ) {
|
||||
log.log(Level.FINEST, "startHostingOnConnection:{0}", hc);
|
||||
|
@ -73,6 +73,7 @@ public class RpcClientService extends AbstractClientService {
|
||||
* Used internally to setup the RpcConnection and MessageDelegator.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void onInitialize( ClientServiceManager serviceManager ) {
|
||||
Client client = serviceManager.getClient();
|
||||
this.rpc = new RpcConnection(client);
|
||||
@ -86,6 +87,7 @@ public class RpcClientService extends AbstractClientService {
|
||||
* was previously added to the network Client.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void terminate( ClientServiceManager serviceManager ) {
|
||||
Client client = serviceManager.getClient();
|
||||
client.removeMessageListener(delegator, delegator.getMessageTypes());
|
||||
|
@ -110,6 +110,7 @@ public final class FbxMesh extends FbxNodeAttribute<IntMap<Mesh>> {
|
||||
return skinDeformer;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void applyCluster(FbxCluster cluster) {
|
||||
if (boneIndices == null) {
|
||||
boneIndices = new ArrayList[positions.length];
|
||||
|
@ -63,6 +63,7 @@ public class CustomContentManager {
|
||||
return output;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> T readExtension(String name, JsonElement el, T input) throws AssetLoadException, IOException {
|
||||
JsonElement extensions = el.getAsJsonObject().getAsJsonObject("extensions");
|
||||
if (extensions == null) {
|
||||
@ -93,6 +94,7 @@ public class CustomContentManager {
|
||||
return input;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> T readExtras(String name, JsonElement el, T input) throws AssetLoadException {
|
||||
if (key == null) {
|
||||
return input;
|
||||
|
@ -1105,6 +1105,7 @@ public class DOMInputCapsule implements InputCapsule {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public ArrayList<Savable> readSavableArrayList(String name, ArrayList defVal) throws IOException {
|
||||
try {
|
||||
Element tmpEl = findChildElement(currentElem, name);
|
||||
@ -1139,6 +1140,7 @@ public class DOMInputCapsule implements InputCapsule {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public ArrayList<Savable>[] readSavableArrayListArray(
|
||||
String name, ArrayList[] defVal) throws IOException {
|
||||
try {
|
||||
@ -1185,6 +1187,7 @@ public class DOMInputCapsule implements InputCapsule {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public ArrayList<Savable>[][] readSavableArrayListArray2D(String name, ArrayList[][] defVal) throws IOException {
|
||||
try {
|
||||
Element tmpEl = findChildElement(currentElem, name);
|
||||
|
@ -83,6 +83,7 @@ public class BresenhamTerrainPicker implements TerrainPicker {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public int getTerrainIntersection(Ray worldPick, CollisionResults results) {
|
||||
int numCollisions = 0;
|
||||
worldPickRay.set(worldPick);
|
||||
|
Loading…
x
Reference in New Issue
Block a user