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 91675

Summary: GenerationUtils#addAnnotation does not retain newly added methods
Product: javaee Reporter: Erno Mononen <emononen>
Component: CodeAssignee: Andrei Badea <abadea>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 90607    
Attachments: GenerationUtilsTest diff

Description Erno Mononen 2007-01-02 13:48:55 UTC
There seems to be some issue with the GenerationUtils#addAnnotation(ClassTree, 
AnnotationTree) method when the given class has members that were added within 
the same task in which the addAnnotations method was invoked. It seems that the 
added members are lost after invoking the addAnnotations method. Attached is a 
diff for o.n.m.j2ee.common.source.GenerationUtilsTest containing a test case 
demonstrating the problem. Note that if you comment out the call to 
TreeMaker#addModifiersAnnotation in the addAnnotation method, the newly added 
methods are not lost, so unless the usage pattern in the addAnnotation method 
is not valid the problem might be in the TreeMaker.
Comment 1 Erno Mononen 2007-01-02 13:59:49 UTC
Created attachment 36975 [details]
GenerationUtilsTest diff
Comment 2 Andrei Badea 2007-01-02 14:33:46 UTC

*** This issue has been marked as a duplicate of 91265 ***