This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
ClassElement.setModifiers() inserts multiple interface keywords if called with the Modifier.INTERFACE flag set on an interface file. The correct behavior should be to ignore (as per newgroup response listed below): Yes, mask the INTERFACE modifier out ;-) It's unsupported value in setModifiers() and I guess it should be ignored, rather than generated into the text (please file a bug). Use classElement.setClassOrInterface(false) to turn the ClassElement to an interface, or setClassOrInterface(true) to make a class from it. -Svata Dana Kaufman wrote: > I have a class that is an interface. Part of my code takes the ClassElement > for this class and updates the modifiers using ClassElement.setModifiers(). > One of the modifiers in Modifier.INTERFACE. After the modifiers are > updated, my class now has two interface keywords: > > Before: > > public interface interface Interest1Home extends javax.ejb.EJBHome { > > } > > After: > public interface interface Interest1Home extends javax.ejb.EJBHome { > > } >
Cleaning up before 4.0 planning
Target milestone was changed from not determined to TBD
This is still the case. IMO it is a bug. I guess the same is true for enums and annotations on JDK 5.0.
Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/AnnotationTypeImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/AnnotationTypeImpl.java,v <-- AnnotationTypeImpl.java new revision: 1.7; previous revision: 1.6 done Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/FeatureImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/FeatureImpl.java,v <-- FeatureImpl.java new revision: 1.27; previous revision: 1.26 done Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/JavaClassImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/JavaClassImpl.java,v <-- JavaClassImpl.java new revision: 1.42; previous revision: 1.41 done
*** Issue 51673 has been marked as a duplicate of this issue. ***
Reorganization of java component