United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6753718 raw type warnings should be suprresed during a langtools build
JDK-6753718 : raw type warnings should be suprresed during a langtools build

Details
Type:
Bug
Submit Date:
2008-09-29
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
tools
OS:
other
Sub-Component:
javac
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
The recent put back for 6747671 (Xlint:rawtypes) is causing a lot of warnings to be generated by javac when compiling the langtools workspace. Please, adjust the build.properties file so that such warnings get suppressed.

ACTUAL BEHAVIOR

    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/source/util/Trees.java:77: warning: [raw-type] found raw type: java.lang.Class
    [javac] missing type parameters for generic class java.lang.Class<T>
    [javac]             Method m = c.getMethod("instance", new Class[] { argType });
    [javac]                                                    ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/Main.java:59: warning: [raw-type] found raw type: java.lang.Class
    [javac] missing type parameters for generic class java.lang.Class<T>
    [javac]         Method method = c.getDeclaredMethod ("main", new Class[] {args.getClass()});
    [javac]                                                          ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/List.java:76: warning: [raw-type] found raw type: com.sun.tools.javac.util.List
    [javac] missing type parameters for generic class com.sun.tools.javac.util.List<A>
    [javac]     private static List EMPTY_LIST = new List<Object>(null,null) {
    [javac]                    ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/List.java:321: warning: [raw-type] found raw type: com.sun.tools.javac.util.List
    [javac] missing type parameters for generic class com.sun.tools.javac.util.List<A>
    [javac]     public static boolean equals(List xs, List ys) {
    [javac]                                  ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/List.java:321: warning: [raw-type] found raw type: com.sun.tools.javac.util.List
    [javac] missing type parameters for generic class com.sun.tools.javac.util.List<A>
    [javac]     public static boolean equals(List xs, List ys) {
    [javac]                                           ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/List.java:371: warning: [raw-type] found raw type: java.util.Iterator
    [javac] missing type parameters for generic class java.util.Iterator<E>
    [javac]     private static Iterator EMPTYITERATOR = new Iterator() {
    [javac]                    ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/List.java:371: warning: [raw-type] found raw type: java.util.Iterator
    [javac] missing type parameters for generic class java.util.Iterator<E>
    [javac]     private static Iterator EMPTYITERATOR = new Iterator() {
    [javac]                                                 ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Context.java:119: warning: [raw-type] found raw type: com.sun.tools.javac.util.Context.Key
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Context.Key<T>
    [javac]     private Map<Key,Object> ht = new HashMap<Key,Object>();
    [javac]                 ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Context.java:119: warning: [raw-type] found raw type: com.sun.tools.javac.util.Context.Key
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Context.Key<T>
    [javac]     private Map<Key,Object> ht = new HashMap<Key,Object>();
    [javac]                                              ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Context.java:131: warning: [raw-type] found raw type: com.sun.tools.javac.util.Context.Factory
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Context.Factory<T>
    [javac]         if (data instanceof Factory)
    [javac]                             ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Context.java:135: warning: [raw-type] found raw type: com.sun.tools.javac.util.Context.Factory
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Context.Factory<T>
    [javac]         if (old != null && !(old instanceof Factory) && old != data && data != null)
    [javac]                                             ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Context.java:143: warning: [raw-type] found raw type: com.sun.tools.javac.util.Context.Factory
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Context.Factory<T>
    [javac]         if (o instanceof Factory) {
    [javac]                          ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Context.java:144: warning: [raw-type] found raw type: com.sun.tools.javac.util.Context.Factory
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Context.Factory<T>
    [javac]             Factory fac = (Factory)o;
    [javac]             ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Context.java:144: warning: [raw-type] found raw type: com.sun.tools.javac.util.Context.Factory
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Context.Factory<T>
    [javac]             Factory fac = (Factory)o;
    [javac]                            ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Context.java:146: warning: [raw-type] found raw type: com.sun.tools.javac.util.Context.Factory
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Context.Factory<T>
    [javac]             if (o instanceof Factory)
    [javac]                              ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Pair.java:55: warning: [raw-type] found raw type: com.sun.tools.javac.util.Pair
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Pair<A,B>
    [javac]             other instanceof Pair &&
    [javac]                              ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Pair.java:56: warning: [raw-type] found raw type: com.sun.tools.javac.util.Pair
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Pair<A,B>
    [javac]             equals(fst, ((Pair)other).fst) &&
    [javac]                           ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/util/Pair.java:57: warning: [raw-type] found raw type: com.sun.tools.javac.util.Pair
    [javac] missing type parameters for generic class com.sun.tools.javac.util.Pair<A,B>
    [javac]             equals(snd, ((Pair)other).snd);
    [javac]                           ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java:952: warning: [raw-type] found raw type: java.util.Collection
    [javac] missing type parameters for generic class java.util.Collection<E>
    [javac]         if (files instanceof Collection)
    [javac]                              ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java:953: warning: [raw-type] found raw type: java.util.Collection
    [javac] missing type parameters for generic class java.util.Collection<E>
    [javac]             result = new ArrayList<RegularFileObject>(((Collection)files).size());
    [javac]                                                         ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java:1056: warning: [raw-type] found raw type: javax.tools.DiagnosticListener
    [javac] missing type parameters for generic class javax.tools.DiagnosticListener<S>
    [javac]         DiagnosticListener dl = context.get(DiagnosticListener.class);
    [javac]         ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java:1117: warning: [raw-type] found raw type: java.util.List
    [javac] missing type parameters for generic class java.util.List<E>
    [javac]                 List dirEntries = dirEntry.getEntriesAsCollection();
    [javac]                 ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java:223: warning: [raw-type] found raw type: java.lang.Class
    [javac] missing type parameters for generic class java.lang.Class<T>
    [javac]                     value = Enum.valueOf((Class) returnClass, constName);
    [javac]                                           ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java:226: warning: [raw-type] found raw type: java.lang.Class
    [javac] missing type parameters for generic class java.lang.Class<T>
    [javac]                                         (Class) returnClass, constName);
    [javac]                                          ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java:58: warning: [raw-type] found raw type: java.lang.Class
    [javac] missing type parameters for generic class java.lang.Class<T>
    [javac]     private static void fail(Class service, String msg)
    [javac]                              ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java:63: warning: [raw-type] found raw type: java.lang.Class
    [javac] missing type parameters for generic class java.lang.Class<T>
    [javac]     private static void fail(Class service, URL u, int line, String msg)
    [javac]                              ^
    [javac] /media/data/ws/jdk7/integration/testws/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java:84: warning: [raw-type] found raw type: java.lang.Class
    [javac] missing type parameters for generic class java.lang.Class<T>
    [javac]     private static boolean parse(Class service, URL u) throws ServiceConfigurationError {
    [javac]                                  ^
    [javac] 27 warnings

                                    

Comments
EVALUATION

Will do
                                     
2008-09-29
SUGGESTED FIX

a webrev of this fix is available at the following URL
http://sa.sfbay.sun.com/projects/langtools_data/7/6753718
                                     
2008-09-29



Hardware and Software, Engineered to Work Together