project: Fix deprecations and supress unchecked warnings
This commit is contained in:
@@ -66,6 +66,7 @@ public class InvokeDynamic extends Instruction implements InvokeInstruction
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<net.runelite.asm.Method> getMethods()
|
||||
{
|
||||
return Collections.EMPTY_LIST;
|
||||
|
||||
@@ -75,6 +75,7 @@ public class InvokeSpecial extends Instruction implements InvokeInstruction
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<net.runelite.asm.Method> getMethods()
|
||||
{
|
||||
return myMethod != null ? Arrays.asList(myMethod) : Collections.EMPTY_LIST;
|
||||
|
||||
@@ -83,6 +83,7 @@ public class InvokeStatic extends Instruction implements InvokeInstruction
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<net.runelite.asm.Method> getMethods()
|
||||
{
|
||||
return myMethod != null ? Arrays.asList(myMethod) : Collections.EMPTY_LIST;
|
||||
|
||||
@@ -70,6 +70,7 @@ public class MethodContext
|
||||
return contexts.get(i);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Collection<InstructionContext> getInstructionContexts()
|
||||
{
|
||||
return (Collection) contexts.values();
|
||||
|
||||
@@ -167,7 +167,7 @@ public class ModArith implements Deobfuscator
|
||||
|
||||
FieldInfo fieldInfo = getFieldInfo(fi.getMyField());
|
||||
|
||||
List<InstructionContext> l = getInsInExpr(ctx, new HashSet(), false);
|
||||
@SuppressWarnings("unchecked") List<InstructionContext> l = getInsInExpr(ctx, new HashSet(), false);
|
||||
boolean other = false; // check if this contains another field
|
||||
boolean getter = false, setter = false;
|
||||
for (InstructionContext i : l)
|
||||
@@ -272,7 +272,7 @@ public class ModArith implements Deobfuscator
|
||||
|
||||
// parse the full multiplication expression to
|
||||
// get all associated constants
|
||||
List<InstructionContext> insInExpr = getInsInExpr(ctx, new HashSet(), true);
|
||||
@SuppressWarnings("unchecked") List<InstructionContext> insInExpr = getInsInExpr(ctx, new HashSet(), true);
|
||||
|
||||
for (InstructionContext ctx2 : insInExpr)
|
||||
{
|
||||
|
||||
@@ -171,6 +171,7 @@ public class ConstantParameter implements Deobfuscator
|
||||
findConstantParameter(methods, ins);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private List<ConstantMethodParameter> findParametersForMethod(Method m)
|
||||
{
|
||||
Collection<ConstantMethodParameter> c = mparams.get(m);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class CheckExports
|
||||
@Before
|
||||
public void before() throws MalformedURLException, ClassNotFoundException
|
||||
{
|
||||
ClassLoader loader = new URLClassLoader(new URL[]{CLIENT.toURL()});
|
||||
ClassLoader loader = new URLClassLoader(new URL[]{CLIENT.toURI().toURL()});
|
||||
|
||||
Class c = loader.loadClass("net.runelite.rs.client.client");
|
||||
classes.add(c);
|
||||
@@ -70,6 +70,7 @@ public class CheckExports
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Class<?> findClassWithObfuscatedName(String name)
|
||||
{
|
||||
for (Class c : classes)
|
||||
|
||||
@@ -53,7 +53,7 @@ public class CheckMappings
|
||||
@Before
|
||||
public void before() throws MalformedURLException, ClassNotFoundException
|
||||
{
|
||||
ClassLoader loader = new URLClassLoader(new URL[]{CLIENT.toURL()});
|
||||
ClassLoader loader = new URLClassLoader(new URL[]{CLIENT.toURI().toURL()});
|
||||
|
||||
Class c = loader.loadClass("client");
|
||||
classes.add(c);
|
||||
@@ -71,6 +71,7 @@ public class CheckMappings
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Class<?> findClassWithObfuscatedName(String name)
|
||||
{
|
||||
for (Class c : classes)
|
||||
|
||||
Reference in New Issue
Block a user