You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "DongChunHao (via GitHub)" <gi...@apache.org> on 2024/04/22 12:02:43 UTC

[I] Move method refactoring error due to 'super' call [netbeans]

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

   ### Apache NetBeans version
   
   Apache NetBeans 21
   
   ### What happened
   
   When I select "m()" and perform the move method refactoring, and i click "OK", a syntax error:
   
   public class OriginalClass {
       public int m() {
           return 1;
       }
       public class C extends OriginalClass {
          // move method to  class B
           public int m(B b) {
               return super.m();
           }
       }
   }
   class B {
   }
   
   refactoring result:
   ![image](https://github.com/apache/netbeans/assets/77560508/c5a2f43f-3903-4caa-b3bb-ba6359c023d6)
   
   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 "m()" and perform the move method refactoring, and i click "OK", a syntax error:
   
   public class OriginalClass {
       public int m() {
           return 1;
       }
       public class C extends OriginalClass {
          // move method to  class B
           public int m(B b) {
               return super.m();
           }
       }
   }
   class B {
   }
   
   
   ### 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: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Move method refactoring error due to 'super' call [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net closed issue #7307: Move method refactoring error due to 'super' call
URL: https://github.com/apache/netbeans/issues/7307


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists