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.
If a method and its javadoc is added programatically as follows MethodTree m = make.Method(...); ClassTree modifiedClazz = make.insertClassMember(..., m); Comment comment = Comment.create(Comment.Style.JAVADOC, -2, -2, -2, "Test comment"); make.addComment(m, comment, true); method and javadoc are succesfully created but a blank line exists between the two
Created attachment 40116 [details] Test module to reproduce the bug
Build and install the attached module and follow these steps to reproduce the bug 1) Open the file TestClass.java which is part of the project 2) Select Refactor|Insert Member Look at the method being inserted before the constructor. You will see that a blank line appears between the inserted method and its javadoc
Fixed, regression test provided. Checking in src/org/netbeans/modules/java/source/pretty/VeryPretty.java; /cvs/java/source/src/org/netbeans/modules/java/source/pretty/VeryPretty.java,v <-- VeryPretty.java new revision: 1.21; previous revision: 1.20 done Checking in test/unit/src/org/netbeans/api/java/source/gen/CommentsTest.java; /cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/CommentsTest.java,v <-- CommentsTest.java new revision: 1.15; previous revision: 1.14 done