Compiler should warn if a generic class extends or implements a raw type

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: 7
    • Component/s: tools
    • generic
    • generic

      Compiler should warn if a generic class extends or implements a raw type.


      import java.util.Collection;

      class Test<E> implements Int1 { // warning
           public void m2(Integer...c){}
           public void m1(Collection<Number> c){}
           // public void m1(Collection c){} // Replacing above line with this compiles.
      }
      interface Int1<T> {
          void m1(Collection <Number> c);
           void m2(Integer...c);
      }

            Assignee:
            Unassigned
            Reporter:
            Seetharama Avadhanam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: