JDK-5064052 : unnecessary bridge methods interfere with some generics retrofitting
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2004-06-16
  • Updated: 2004-06-25
  • Resolved: 2004-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b58Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
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

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-rc FIXED IN: tiger-rc INTEGRATED IN: tiger-b58 tiger-rc
08-09-2004

SUGGESTED FIX Stop generating brige methods for a method as its own implementation.
08-09-2004

PUBLIC COMMENTS ...
08-09-2004

EVALUATION These bridge methods are provably unnecessary and should be removed. ###@###.### 2004-06-17
17-06-2004