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.

Bug 65285 - [Fix Imports] throws RuntimeException when a source includes some nested annotations.
Summary: [Fix Imports] throws RuntimeException when a source includes some nested anno...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Tomas Hurka
URL:
Keywords:
: 64857 67487 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-28 22:29 UTC by naoki
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description naoki 2005-09-28 22:29:10 UTC
"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{
}
Comment 1 Martin Matula 2005-09-30 14:04:51 UTC
Tomas is working on this.
Comment 2 Daniel Prusa 2005-10-14 13:52:24 UTC
*** Issue 64857 has been marked as a duplicate of this issue. ***
Comment 3 Tomas Hurka 2005-10-27 14:27:42 UTC
*** Issue 67487 has been marked as a duplicate of this issue. ***
Comment 4 cf126330 2005-11-25 02:30:10 UTC
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 {
Comment 5 Tomas Hurka 2005-11-25 09:32:48 UTC
To cf126330: This is not P2 bug. Please do not raise priority only for the reason that you want fix in NB 
5.0
Comment 6 cf126330 2005-11-27 15:23:48 UTC
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.
Comment 7 Tomas Hurka 2005-12-05 14:46:23 UTC
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
Comment 8 Quality Engineering 2007-09-20 09:46:18 UTC
Reorganization of java component