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

unnecessary bridge methods interfere with some generics retrofitting

    XMLWordPrintable

Details

    • b58
    • generic
    • solaris_8

    Description

      The following source:

        class Props extends Hashtable<String,String> {}

      is translated by javac info

        class Props extends Hashtable {
          /*synthetic*/ public Object remove(Object x0) {
              return super.remove(x0);
          }
          /*synthetic*/ public Object put(Object x0, Object x1) {
              return super.put((String)x0, (String)x1);
          }
          /*synthetic*/ public Object get(Object x0) {
              return super.get(x0);
          }
        }

      These bridge methods are unnecessary, and interfere with
      retrofitting java.util.Properties as Hashtable<String,String>.

      See also http://groups.yahoo.com/group/java-spec-report/message/1017

      Attachments

        Issue Links

          Activity

            People

              gafter Neal Gafter
              gafter Neal Gafter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: