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.
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.
Created attachment 36975 [details] GenerationUtilsTest diff
*** This issue has been marked as a duplicate of 91265 ***