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.
"fix imports" throws RuntimeException when a source includes some nested annotations as "SomeClass.java" shown below. The message of the thrown exception is "Unexception: Unexpected type of ASTree: 86" at MetadataElement.java:682 --- SomeClass.java --- @interface Outer{ Inner value(); } @interface Inner{ } @Outer(value=@Inner) public class SomeClass{ }
Tomas is working on this.
*** Issue 64857 has been marked as a duplicate of this issue. ***
*** Issue 67487 has been marked as a duplicate of this issue. ***
I have encountered this bug in 4.1, 5.0 beta1 and 5.0 beta2. I hope this bug fix can make the 5 fcs. Javaee 5 heavily uses annotations and nested annotations are very common. For instance, I have lots of ejb30 code look like this but I cannot run 'fix import': @MessageDriven(name="DestBean", activationConfig = { @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue")}) //@TransactionAttribute(TransactionAttributeType.REQUIRED) public class Foo {
To cf126330: This is not P2 bug. Please do not raise priority only for the reason that you want fix in NB 5.0
I raised the priority to P2 because "fix imports" is a basic functionality in an IDE, and this has been broken for 3 or 4 consecutive releases. This is something I think deserves a P2.
It should be fixed in trunk. Checking in jmiimpl/javamodel/AttributeValueImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/AttributeValueImpl.java,v <-- AttributeValueImpl.java new revision: 1.19; previous revision: 1.18 done Checking in parser/AnnotationValueInfo.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/parser/AnnotationValueInfo.java,v <-- AnnotationValueInfo.java new revision: 1.4; previous revision: 1.3 done
Reorganization of java component