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

Summary: New line appears between method and its javadoc
Product: java Reporter: _ deva <deva>
Component: SourceAssignee: Pavel Flaska <pflaska>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 90451    
Attachments: Test module to reproduce the 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 
comment");
  make.addComment(m, comment, true);

method and javadoc are succesfully created but a blank line exists between the 
two
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 
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
Comment 3 Pavel Flaska 2007-05-17 10:07:55 UTC
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