Allow unchecked override of generified methods in parameterless classes

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P1
    • 5.0
    • Affects Version/s: 5.0
    • Component/s: tools
    • b59
    • generic, x86
    • generic, linux, solaris_8

      We recently discovered an issue where generification would break existing clients. Consider this to be generified API:

      interface AttributeSet {
        Attribute get(Class category);
      }

      and an implementation:

      class AttributeSetImpl implements AttributeSet {
        Attribute get(Class category) { ... }
      }

      Now generify the interface:

      interface AttributeSet {
        Attribute get(Class<?> category);
      }

      Now, according to the compiler, the class AttributeSetImpl no longer overrides the get method.

      ###@###.### 2004-07-12

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: