Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.6.1.Release
-
Fix Version/s: None
-
Component/s: Refactoring
-
Labels:None
-
Number of attachments :
Description
Consider this script:
private void f() { // Comment println "" }
Select the entire body of the method and run the extract method refactoring. The result is this:
private void f() { // Comment ff() } private ff() { println "" }
Notice that the comment was not moved to the new method even though it should have been.
The same behavior is seen with trailing comments:
private void f() { println "" // Comment }
The result of extract method is this:
private void f() { ff() // Comment } private ff() { println "" }