This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 205076 - [Introduce Method] Illegal refactoring - method already defined does not work
Summary: [Introduce Method] Illegal refactoring - method already defined does not work
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 214620 220334 231144 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-14 09:37 UTC by asenk
Modified: 2016-07-07 07:16 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description asenk 2011-11-14 09:37:49 UTC
Product Version: NetBeans IDE Dev (Build 201111130600)
Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02
System: Linux version 3.0.0-12-generic-pae running on i386; UTF-8; en_US (nb)

SUMMARY: Introduce Method creates method that is already defined. 

http://wiki.netbeans.org/TS_60_Refactoring2 -there is sample project.

1.Open file packageA.ClassA
2.Select the code form mark //4 to //5
3.Call Refactor -> Introduce Method
4.Change method name to existing
5.Confirm dialog

RESULT: new method called existing with two parameters (int) is created. It means that in ClaasA are two methods with same name and same parameters. This class is no compilable after this refactoring.
Comment 1 Jan Lahoda 2012-06-22 11:35:10 UTC
*** Bug 214620 has been marked as a duplicate of this bug. ***
Comment 2 Jan Lahoda 2012-10-25 13:14:47 UTC
*** Bug 220334 has been marked as a duplicate of this bug. ***
Comment 3 Jan Lahoda 2013-06-12 13:42:02 UTC
*** Bug 231144 has been marked as a duplicate of this bug. ***
Comment 4 mmolda 2013-11-22 14:52:59 UTC
Still present in:

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
Comment 5 Svata Dedic 2013-11-22 14:57:54 UTC
Increasing priority, uncompilable code.
Comment 6 Martin Balin 2016-07-07 07:16:45 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss