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.
I rewrite ModifiersTree: TreeMaker make = wc.getTreeMaker(); List<AnnotationTree> ann = new ArrayList<AnnotationTree>(); ann.add(ann1.get(1)); ann.add(ann1.get(0)); ModifiersTree t = make.Modifiers(fla2, ann); System.out.println("ann: " + ann); rewrite(node, t); ann1 is the original list of annotations. The source: @A1 @A2 class ListOfAnnotations { @A1 @A2 static void m() { } } The output in the log is: ann: [@A2(), @A1()] original: @A1() @A2() modified: @A2() @A1() ann: [@A2(), @A1()] original: @A1() @A2() static modified: @A2() @A1() static This is correct. However, the result is incorrect: @A2 class ListOfAnnotations { @A2 static void m() { } }
Reassigning all moonko's java/source bugs to myself.
Bug prior to 7.0, not touched for the last 2 years --> P4.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss