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 99329 - New line appears between method and its javadoc
Summary: New line appears between method and its javadoc
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Pavel Flaska
Depends on:
Blocks: 90451
  Show dependency tree
Reported: 2007-03-29 01:25 UTC by _ deva
Modified: 2007-05-17 10:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Test module to reproduce the bug (19.20 KB, application/octet-stream)
2007-03-29 01:26 UTC, _ deva

Note You need to log in before you can comment on or make changes to this bug.
Description _ deva 2007-03-29 01:25:31 UTC
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 
  make.addComment(m, comment, true);

method and javadoc are succesfully created but a blank line exists between the 
Comment 1 _ deva 2007-03-29 01:26:04 UTC
Created attachment 40116 [details]
Test module to reproduce the bug
Comment 2 _ deva 2007-03-29 01:29:25 UTC
Build and install the attached module and follow these steps to reproduce the 
1) Open the file 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
Comment 3 Pavel Flaska 2007-05-17 10:07:55 UTC
Fixed, regression test provided.

Checking in src/org/netbeans/modules/java/source/pretty/;
new revision: 1.21; previous revision: 1.20
Checking in test/unit/src/org/netbeans/api/java/source/gen/;
new revision: 1.15; previous revision: 1.14