Skip to content

Commit

Permalink
Fix console warnings during compilation (gradle build)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauer committed Aug 28, 2015
1 parent ffb9788 commit 0d93d33
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void compile(ClassNode cls) {
}

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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ClassLoader getClassLoader(Location location) {

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 {
Expand All @@ -55,7 +55,7 @@ public Class<?> loadClass(String name) throws ClassNotFoundException {
}

public Class<?> replaceClass(String name) throws ClassNotFoundException {
Class cacheCls = clsCache.get(name);
Class<?> cacheCls = clsCache.get(name);
if (cacheCls != null) {
return cacheCls;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private Object getInstance() throws Exception {
}

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);
Expand All @@ -68,7 +68,7 @@ public Object invoke(Method mth, Object... args) throws Exception {
return mth.invoke(getInstance(), args);
}

private Class<?> checkType(Class type) throws ClassNotFoundException {
private Class<?> checkType(Class<?> type) throws ClassNotFoundException {
if (type.isPrimitive()) {
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void testOrder() {
}

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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -26,15 +26,15 @@ public final <T extends Parcelable> T test(ClassLoader loader) {
}
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);
Expand Down
2 changes: 1 addition & 1 deletion jadx-gui/src/main/java/jadx/gui/treemodel/JRoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private JResource getResourceByName(JResource rf, String name) {
}

public JNode searchClassInTree(JNode node) {
Enumeration en = this.breadthFirstEnumeration();
Enumeration<?> en = this.breadthFirstEnumeration();
while (en.hasMoreElements()) {
Object obj = en.nextElement();
if (node.equals(obj)) {
Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/java/jadx/gui/ui/LogViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public final void initUI() {

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() {
Expand Down

0 comments on commit 0d93d33

Please sign in to comment.