Unchecked warning required for checked assignment

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P5
    • None
    • Affects Version/s: 5.0
    • Component/s: specification
    • None
    • generic
    • generic

      The program below generates one warning, although the two fields has
      equivalent types.

      class Handle<E extends Number> {
      }

      abstract class GenericAssignment {

          Handle<? extends Number> whyWarning = lookup(Handle.class);
          Handle<?> noWarning = lookup(Handle.class);

          abstract <T> T lookup(Class<T> clazz);

      }

            Assignee:
            Alex Buckley
            Reporter:
            Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: