Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5073079

Allow unchecked override of generified methods in parameterless classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 5.0
    • 5.0
    • 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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: