Apache NetBeans version
Apache NetBeans IDE 25-rc2
What happened
Product Version: Apache NetBeans IDE 25-rc2
Doing refactor>rename messes up javadoc comments that reference the renamed item.
Have observed
- spaces removed after period
- several lines are turned into a single line
- '*' at the beginning of a line are removed for a few consecutive lines
Language / Project Type / NetBeans Component
java
How to reproduce
- Start NB 25-rc2 with no userdir/cachdir
- On startup welcome page,
NewProject Maven
- Make file look like test-file below
- Click on
m2 in line 20, use context menu Refactor>Rename
- Change
m2 to someDifferentName
Observe lines 4, 9 (see below): the javadoc comments are incorrectly formatted.
- There is no space after the initial period, ('.').
- Multiple lines are turned into a single line.
Also fails in NB 24. Works in NB 23.
test-file
package mavenproject4;
/**
* This is the class comment.
* It references {@link #m1() }.
* It also references {@link #m2() }.
*/
public class Mavenproject4 {
/**
* This is another example.
* It references {@link #m2() }.
*/
public void m1() {
}
/**
* This is another example.
* It references {@link #m1() }.
*/
public void m2() {
}
}
after refactor rename
package mavenproject4;
/**
* This is the class comment.It references {@link #m1()}.
* It also references {@link #someDifferentName() }.
*/
public class Mavenproject4 {
/**
* This is another example.It references {@link #someDifferentName()}.
*/
public void m1() {
}
/**
* This is another example.
* It references {@link #m1() }.
*/
public void someDifferentName() {
}
}
Did this work correctly in an earlier version?
NetBeans 23
Operating System
Linux harmony 6.9.3-76060903-generic #202405300957173877096822.04~d5f7c84 SMP PREEMPT_DYNAMIC Wed F x86_64 x86_64 x86_64 GNU/Linux
JDK
Java: 23.0.1; OpenJDK 64-Bit Server VM 23.0.1+11-39 Runtime: OpenJDK Runtime Environment 23.0.1+11-39 System: Linux version 6.9.3-76060903-generic running on amd64; UTF-8; en_US (nb)
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
every time
Are you willing to submit a pull request?
No
Apache NetBeans version
Apache NetBeans IDE 25-rc2
What happened
Product Version: Apache NetBeans IDE 25-rc2
Doing
refactor>renamemesses up javadoc comments that reference the renamed item.Have observed
Language / Project Type / NetBeans Component
java
How to reproduce
NewProject Mavenm2in line 20, use context menuRefactor>Renamem2tosomeDifferentNameObserve lines 4, 9 (see below): the javadoc comments are incorrectly formatted.
Also fails in NB 24. Works in NB 23.
test-file
after refactor rename
Did this work correctly in an earlier version?
NetBeans 23
Operating System
Linux harmony 6.9.3-76060903-generic #202405300957
173877096822.04~d5f7c84 SMP PREEMPT_DYNAMIC Wed F x86_64 x86_64 x86_64 GNU/LinuxJDK
Java: 23.0.1; OpenJDK 64-Bit Server VM 23.0.1+11-39 Runtime: OpenJDK Runtime Environment 23.0.1+11-39 System: Linux version 6.9.3-76060903-generic running on amd64; UTF-8; en_US (nb)
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
every time
Are you willing to submit a pull request?
No