JDK-6232928 : Interface package-info not marked synthetic and abstract
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0,6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-02-24
  • Updated: 2017-05-16
  • Resolved: 2005-09-30
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.
JDK 6
6 b55Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
package-info is not marked synthetic.  Perhaps it should be.

###@###.### 2005-2-24 23:13:47 GMT

Interface package-info in package-info.class is not defined in package-info.java. We'd better mark it synthetic.

###@###.### 2005-03-10 20:14:01 GMT

Comments
EVALUATION According to the JVMS, there is wiggle room for the synthetic bit. However, we *should* always mark all synthetic entities synthetic. When it comes to the abstract bit, there is not wiggle room. The specification clearly says that any interface must be marked abstract.
05-08-2005

EVALUATION Similar problem for ACC_ABSTRACT.
05-08-2005

EVALUATION Changed to spec bug to clarify this issue.
05-08-2005

EVALUATION From "4.8.8 The Synthetic Attribute" JVM spec: "The Synthetic attribute7 is a fixed-length attribute in the attributes table of ClassFile (4.2), field_info (4.6), and method_info (4.7) structures. A class member that does not appear in the source code must be marked using a Synthetic attribute, or else it must have its ACC_SYNTHETIC bit set. The only exceptions to this requirement are for default constructors and the class initialization method." The package-info interface is not a class member, so this rule does not apply to this interface. The for the ACC_SYNTHETIC bit say: "A class may be marked with the ACC_SYNTHETIC flag to indicate that it was generated by the compiler and does not appear in the source code." Conclusion: it is permissible to mark the interface synthetic, but not required. We should consider marking the interface synthetic in mustang. ###@###.### 2005-03-08 08:54:06 GMT
08-03-2005