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 205081

Summary: Introduce Field creates already defined Field without any warning
Product: java Reporter: asenk
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: normal CC: jiriprox, ssazonov
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description asenk 2011-11-14 10:25:19 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)

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

Looks it should be same problem as http://netbeans.org/bugzilla/show_bug.cgi?id=205076

1.Open file packageE.ClassA
2.Select text "Text" in the "method method3()"
3.Use Alt-Enter to show list of possible hints and select
4.Fill name of existing field as field name
5.Press OK 

EXPECTED RESULT: The warning that field already exist should be shown 

RESULT: No warning is shown, field with same name as already existing field is created.
Comment 1 Jan Lahoda 2013-06-10 07:36:33 UTC
*** Bug 230938 has been marked as a duplicate of this bug. ***
Comment 2 Jan Lahoda 2013-06-12 13:42:29 UTC
*** Bug 231145 has been marked as a duplicate of this bug. ***
Comment 3 Jiri Prox 2013-07-25 14:07:51 UTC
*** Bug 233432 has been marked as a duplicate of this bug. ***
Comment 4 Jiri Prox 2013-09-27 19:28:14 UTC
In addition there should be also check for locally declared variables - if introducing field with the same name as existing variable 'this.' should be used for referencing new field
Comment 5 Martin Balin 2016-07-07 07:16:33 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