Bug 99451

Summary: Should Acc_Abstract be set for package-info synthetic interface?
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2005-06-10 15:45:04 EDT
It seems that Acc_Interface must be set for annotation. But when Acc_Interface
is set, Acc_Abstract should also be set.
So should annotations have the Acc_Abstract but set?
Comment 1 Olivier Thomann CLA 2005-06-13 11:37:05 EDT
We do tag annotations as abstract.

// Compiled from X.java (version 1.5 : 49.0, no super bit)
abstract @interface X extends java.lang.Object implements
java.lang.annotation.Annotation {
  Constant pool:
    constant #1 utf8: X
    constant #2 class: #1 X
    constant #3 utf8: java/lang/Object
    constant #4 class: #3 java/lang/Object
    constant #5 utf8: java/lang/annotation/Annotation
    constant #6 class: #5 java/lang/annotation/Annotation
    constant #7 utf8: SourceFile
    constant #8 utf8: X.java
}

This is only missing for the synthetic type package-info. This is an interface
that is not tag as abstract.
Update title accordingly.
Comment 2 Olivier Thomann CLA 2005-06-13 11:43:46 EDT
We do set the synthetic interface as abstract, but javac doesn't.

java version "1.5.0_04-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-ea-b04)
Java HotSpot(TM) Client VM (build 1.5.0_04-ea-b04, mixed mode).

javac sets the Acc_Abstract bit for an interface if it is defined on the source
code.
Comment 3 Olivier Thomann CLA 2005-08-31 11:47:16 EDT
Acc_Abstract must be set for any kind of interfaces (synthetic or not).
Also when Acc_Annotation is set, Acc_Abstract and Acc_Interface must be set.
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6232928.
Comment 4 Olivier Thomann CLA 2005-08-31 11:56:53 EDT
This is what we do already.
Closing as INVALID.