javac ignores the @SuppressWarnings("all") annotation in 1.7.0-u4-b07. See example below:
import java.util.ArrayList;
// Works:
// @SuppressWarnings("rawtypes")
// Doesn't work; worked in Java 6:
@SuppressWarnings("all")
public class Test {
private ArrayList list = new ArrayList();
}
To test:
javac -Xlint Test.java
Output:
Test.java:9: warning: [rawtypes] found raw type: ArrayList
private ArrayList list = new ArrayList();
^
missing type arguments for generic class ArrayList<E>
where E is a type-variable:
E extends Object declared in class ArrayList
Test.java:9: warning: [rawtypes] found raw type: ArrayList
private ArrayList list = new ArrayList();
^
missing type arguments for generic class ArrayList<E>
where E is a type-variable:
E extends Object declared in class ArrayList
2 warnings
Changing the value of the annotation to "rawtypes" does work.
import java.util.ArrayList;
// Works:
// @SuppressWarnings("rawtypes")
// Doesn't work; worked in Java 6:
@SuppressWarnings("all")
public class Test {
private ArrayList list = new ArrayList();
}
To test:
javac -Xlint Test.java
Output:
Test.java:9: warning: [rawtypes] found raw type: ArrayList
private ArrayList list = new ArrayList();
^
missing type arguments for generic class ArrayList<E>
where E is a type-variable:
E extends Object declared in class ArrayList
Test.java:9: warning: [rawtypes] found raw type: ArrayList
private ArrayList list = new ArrayList();
^
missing type arguments for generic class ArrayList<E>
where E is a type-variable:
E extends Object declared in class ArrayList
2 warnings
Changing the value of the annotation to "rawtypes" does work.