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 130008

Summary: Introduce field/method should not be available in annotations
Product: java Reporter: Jiri Prox <jiriprox>
Component: HintsAssignee: Daniel Prusa <dprusa>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jiri Prox 2008-03-13 10:14:06 UTC
Product Version: NetBeans IDE Dev (Build 20080313055741)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-120
System: Mac OS X version 10.4.11 running on i386; MacRoman; en_US (nb)

Introduce filed/method produces invalid code when called in annotation type.

Steps to reproduce:
1) have code:
public @interface NewAnnotationType {
    double x() default 2.2;   
}
2) select 2.2
3) use introduce method/field hint  (introduce constant is ok)
Comment 1 Daniel Prusa 2008-03-17 11:51:21 UTC
reproducible, check for annotation type needs to be added
Comment 2 Daniel Prusa 2008-03-17 15:08:40 UTC
Fixed in d6e69d8da4a4.
Comment 3 Jiri Prox 2009-01-15 21:36:28 UTC
verified in
Product Version: NetBeans IDE Dev (Build 20090115032805)
Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16
System: Linux version 2.6.24-23-generic running on i386; UTF-8; en_US (nb)