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

   ### Apache NetBeans version
   
   Apache NetBeans 23
   
   ### What happened
   
   When the m() method in the selection class C performs a move method 
refactoring into A.B, resulting in a change in the calling relationship. Before 
refactoring, k() calls the m() method in class A. After refactoring, the method 
m() in class C moving to class B is called.
   ```java
   class A {
   privatevoid m() {
    System.out.println("Method m() in Class A");
    }
   class B {
   void k() {
    m(); // Calls method m() from Class A
    }
    }
   }
   class C {
   static A.B b; // A static reference to Class B inside Class A
   publicvoid m() {
    System.out.println("Method m() in Class C");
    }
   }
   
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   Select m() in class C, click move, select A.B, and perform the refactoring.
   ```java
   class A {
   privatevoid m() {
    System.out.println("Method m() in Class A");
    }
   class B {
   void k() {
    m(); // Calls method m() from Class A
    }
    }
   }
   class C {
   static A.B b; // A static reference to Class B inside Class A
   publicvoid m() {
    System.out.println("Method m() in Class C");
    }
   }
   ```
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows11
   
   ### JDK
   
   20
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### 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

Reply via email to