DongChunHao opened a new issue, #7306:
URL: https://github.com/apache/netbeans/issues/7306
### Apache NetBeans version
Apache NetBeans 21
### What happened
When I select "callMethod()" and perform the move methodrefactoring, and i
click "OK", a syntax error:
class TargetClass {
}
class SourceClass {
TargetClass target;
//move method
public void callMethod() {
anotherMethod();
}
private void anotherMethod() {
System.out.println("Another method in TargetClass");
}
}'
refactoring result :

Expected result: Check for grammar errors before and after refactoring, and
if so, provide error prompts
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
When I select "callMethod()" and perform the move methodrefactoring, and i
click "OK", a syntax error:
class TargetClass {
}
class SourceClass {
TargetClass target;
//move method
public void callMethod() {
anotherMethod();
}
private void anotherMethod() {
System.out.println("Another method in TargetClass");
}
}'
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows11
### JDK
20
### Apache NetBeans packaging
Apache NetBeans platform
### Anything else
_No response_
### 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