Open
Description
Apache NetBeans version
Apache NetBeans 24
What happened
Select piece of code with yield
statement
and choose "Introduce Method" refactoring.
The generated code is broken. The new method
- has
void
return type - continues to use
yield
instead ofreturn
Looks like special treatment of yield
is needed when introducing methods. CCing @jlahoda, @lahodaj
Language / Project Type / NetBeans Component
No response
How to reproduce
Select piece of code with yield
statement
and choose "Introduce Method" refactoring.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Any
JDK
JDK21
Apache NetBeans packaging
Own source build
Anything else
No response
Are you willing to submit a pull request?
No