Commit 0d93d335 authored by Vladislav Bauer's avatar Vladislav Bauer

Fix console warnings during compilation (gradle build)

parent ffb97880
......@@ -247,7 +247,7 @@ public abstract class IntegrationTest extends TestUtils {
}
public Object invoke(String method) throws Exception {
return invoke(method, new Class[0]);
return invoke(method, new Class<?>[0]);
}
public Object invoke(String method, Class[] types, Object... args) throws Exception {
......
......@@ -35,7 +35,7 @@ public class ClassFileManager extends ForwardingJavaFileManager<StandardJavaFile
private class DynamicClassLoader extends SecureClassLoader {
private final Map<String, JavaClassObject> clsMap = new HashMap<String, JavaClassObject>();
private final Map<String, Class> clsCache = new HashMap<String, Class>();
private final Map<String, Class<?>> clsCache = new HashMap<String, Class<?>>();
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
......@@ -55,7 +55,7 @@ public class ClassFileManager extends ForwardingJavaFileManager<StandardJavaFile
}
public Class<?> replaceClass(String name) throws ClassNotFoundException {
Class cacheCls = clsCache.get(name);
Class<?> cacheCls = clsCache.get(name);
if (cacheCls != null) {
return cacheCls;
}
......
......@@ -58,7 +58,7 @@ public class DynamicCompiler {
}
public Method getMethod(String method, Class[] types) throws Exception {
for (Class type : types) {
for (Class<?> type : types) {
checkType(type);
}
return getInstance().getClass().getMethod(method, types);
......@@ -68,7 +68,7 @@ public class DynamicCompiler {
return mth.invoke(getInstance(), args);
}
private Class<?> checkType(Class type) throws ClassNotFoundException {
private Class<?> checkType(Class<?> type) throws ClassNotFoundException {
if (type.isPrimitive()) {
return type;
}
......
......@@ -34,7 +34,7 @@ public class JadxVisitorsOrderTest {
}
private static List<String> check(List<IDexTreeVisitor> passes) {
List<Class> classList = new ArrayList<Class>(passes.size());
List<Class<?>> classList = new ArrayList<Class<?>>(passes.size());
for (IDexTreeVisitor pass : passes) {
classList.add(pass.getClass());
}
......
......@@ -15,8 +15,8 @@ public class TestIssue13a extends IntegrationTest {
public static class TestCls {
private static final String TAG = "Parcel";
private static final HashMap<ClassLoader, HashMap<String, Parcelable.Creator>>
mCreators = new HashMap<ClassLoader, HashMap<String, Parcelable.Creator>>();
private static final HashMap<ClassLoader, HashMap<String, Parcelable.Creator<?>>>
mCreators = new HashMap<ClassLoader, HashMap<String, Parcelable.Creator<?>>>();
@SuppressWarnings("unchecked")
public final <T extends Parcelable> T test(ClassLoader loader) {
......@@ -26,15 +26,15 @@ public class TestIssue13a extends IntegrationTest {
}
Parcelable.Creator<T> creator;
synchronized (mCreators) {
HashMap<String, Parcelable.Creator> map = mCreators.get(loader);
HashMap<String, Parcelable.Creator<?>> map = mCreators.get(loader);
if (map == null) {
map = new HashMap<String, Parcelable.Creator>();
map = new HashMap<String, Parcelable.Creator<?>>();
mCreators.put(loader, map);
}
creator = map.get(name);
creator = (Parcelable.Creator<T>) map.get(name);
if (creator == null) {
try {
Class c = loader == null ?
Class<?> c = loader == null ?
Class.forName(name) : Class.forName(name, true, loader);
Field f = c.getField("CREATOR");
creator = (Parcelable.Creator) f.get(null);
......
......@@ -71,7 +71,7 @@ public class JRoot extends JNode {
}
public JNode searchClassInTree(JNode node) {
Enumeration en = this.breadthFirstEnumeration();
Enumeration<?> en = this.breadthFirstEnumeration();
while (en.hasMoreElements()) {
Object obj = en.nextElement();
if (node.equals(obj)) {
......
......@@ -41,6 +41,7 @@ class LogViewer extends JDialog {
JPanel controlPane = new JPanel();
controlPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
@SuppressWarnings("unchecked")
final JComboBox cb = new JComboBox(LEVEL_ITEMS);
cb.setSelectedItem(level);
cb.addActionListener(new ActionListener() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment