errael opened a new issue, #8233:
URL: https://github.com/apache/netbeans/issues/8233
### Apache NetBeans version
Apache NetBeans latest daily build
### 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
1. Start NB 25-rc2 with no userdir/cachdir
2. On startup welcome page, `NewProject Maven`
3. Make file look like **test-file** below
4. Click on `m2` in line 20, use context menu `Refactor>Rename`
5. 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. Not sure when the problem was introduced.
**test-file**
```java
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**
```java
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?
No / Don't know
### Operating System
Linux harmony 6.9.3-76060903-generic #202405300957~1738770968~22.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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists