usersuis opened a new issue, #7427:
URL: https://github.com/apache/netbeans/issues/7427

   ### Apache NetBeans version
   
   Apache NetBeans 21
   
   ### What happened
   
   When I tried to perform "introduce method" refactoring on "instanceof" using 
refactoring tool in NetBeans, it resulted in compile error.
   
   ### Language / Project Type / NetBeans Component
   
   Java Maven Project Java Application
   
   ### How to reproduce
   
   Input Program: 
   
   `public class A {
       @FunctionalInterface
       public interface I1 {
           int foo(int a);
       }
   
       interface I2 {
           I1 i1 = (a) -> {
               int b = 10; // Exception on extracting to method
               return a + b;
           };
       }
   }`
   
   Steps:
   Select "int b = extract1();"
   Refactor -> Introduce -> Method
   
   Actual Result:
   a warning: "Invalid Selection."
   
   Expected Result: (from Refactoring tool of IntelliJ)
   `" Select ""int b = extract1();""
   Refactor -> Introduce -> Method"`
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 11
   
   ### JDK
   
   22.0.1
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   It always occurs.
   
   ### 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

Reply via email to