blob: 8a80fbf953d0982574c4b5aa78bb289c8c020e71 [file]
class Test {
public void foo(Object[] array) {
((<warning descr="Casting 'array' to 'String[]' is redundant">String[]</warning>) array)[0] = " ";
}
public void bar(String[] array) {
((Object[]) array)[0] = new Object();
}
public Object obj;
public static void setObjValueInArray(Test t, Object val) {
t.obj = new Object[1];
((Object[])t.obj)[0] = val;
}
public static void arrayDims() {
int[] ints = new int[] {};
Object foo = 1;
ints[(Integer) foo] = 0;
ints[(<warning descr="Casting '1' to 'Integer' is redundant">Integer</warning>) 1] = 0;
}
}