netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Refactoring Bug: Inline methods cause method name conflicts

Open assdfsdafasfa opened this issue 1 year ago • 0 comments

Apache NetBeans version

Apache NetBeans 23

What happened

When "methodToBeInlined" is executed as an inline method, both the "method" target method and the inline method contain internal classes with the same internal class name, leading to naming conflicts.

class SourceClass{ public void m{ class InnerClass{ } methodToBeInlined(); } public void methodToBeInlined(){ class InnerClass{} } }

Language / Project Type / NetBeans Component

No response

How to reproduce

When "methodToBeInlined" is executed as an inline method, both the "method" target method and the inline method contain internal classes with the same internal class name, leading to naming conflicts.

class SourceClass{ public void m{ class InnerClass{ } methodToBeInlined(); } public void methodToBeInlined(){ class InnerClass{} } }

Did this work correctly in an earlier version?

Apache NetBeans 23

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

assdfsdafasfa avatar Oct 08 '24 13:10 assdfsdafasfa