JDK-4175911 : Miranda methods should be marked with Synthetic attribute.
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.5.1
  • CPU: generic
  • Submitted: 1998-09-23
  • Updated: 2003-04-12
  • Resolved: 2002-09-02
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
1.4.2 mantisFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Since miranda methods are a compiler-generated entity, with no analog in the source, it would be appropriate and helpful to mark them with the Synthetic attribute.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis mantis-b02 FIXED IN: mantis mantis-b02 INTEGRATED IN: mantis mantis-b02
14-06-2004

PUBLIC COMMENTS Background: In -target 1.1 mode, the compiler generates an abstract method definition for each method of an abstract class that is inherited from an interface in the implements clause of the class but is not implemented by the class. This was originally done to help work around a bug in an early VM, and has since been maintained for backward compatibility. We call these "Miranda" methods. Because the default is now "-target 1.2", these are not usually seen in the class files generated by javac. We continue to generate Miranda methods with -target 1.1, but starting with J2SE 1.4.2 these methods are marked "Synthetic" in the class file.
10-06-2004

EVALUATION We hope to fix this problem in the first release following 1.2fcs. todd.turnidge@Eng 1998-09-28 Given the lack of a specification to back this up, I'm concerned that there might be some unanticipated compatibility fallout. I think we should defer this to an upgrade release, in which there will be a formal beta-test period. william.maddox@Eng 1999-02-19 Miranda methods should not be needed when compiling for a 1.2VM. We should simply make sure that -target 1.2 suppresses them, and move away from them altogether. Given that Miranda methods are obsolete, it seems inappropriate to risk compatibility problems at this time. william.maddox@Eng 1999-09-16 Miranda methods are not synthetic methods in the same sense as those generate by inner classes. It is true that Miranda methods are added to classes that do not declare them, and are explicitly represented in the class file where they a method would otherwise need not appear, but they are just an implementation device for methods that actually are declared by the user in an inherited interface, and which, conceptually, do belong to the affected class, by inheritance. The synthetic members generated by inner classes, in contrast, bear no connection to any method explicitly declared by the user. william.maddox@Eng 2000-02-09 In 1.4.2, we will be making Miranda methods synthetic to fix a number of bugs in which their presence was affecting semantic analysis. Because Miranda methods are only generated in -target 1.1, and -target 1.2 is the default, this will not affect the output of the compiler by default. ###@###.### 2002-07-08
08-07-2002