Apache NetBeans version
Apache NetBeans 31
What happened
In a Java file, I selected a method. Then I selected Refactor from the menu. The aim was to move a method into a class that I had created as a target. I created in that target class the same static field that the method depended on. I selected package and class of the target. I realized that the dialog allowed me to select multiple methods so I selected more. When I finally clicked the "Refactor" button, the exception was thrown and the operation could not complete.
Language / Project Type / NetBeans Component
Java Maven Project
How to reproduce
messages.log
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 10
JDK
JDK 26
Apache NetBeans packaging
Community provided installer
Anything else
No response
Are you willing to submit a pull request?
No
Apache NetBeans version
Apache NetBeans 31
What happened
In a Java file, I selected a method. Then I selected Refactor from the menu. The aim was to move a method into a class that I had created as a target. I created in that target class the same static field that the method depended on. I selected package and class of the target. I realized that the dialog allowed me to select multiple methods so I selected more. When I finally clicked the "Refactor" button, the exception was thrown and the operation could not complete.
Language / Project Type / NetBeans Component
Java Maven Project
How to reproduce
messages.log
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 10
JDK
JDK 26
Apache NetBeans packaging
Community provided installer
Anything else
No response
Are you willing to submit a pull request?
No