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 116012

Summary: [Introduce Method] existing signature allowed
Product: java Reporter: novakm <novakm>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description novakm 2007-09-19 15:12:57 UTC
I have an existing method:

  public int existing(int a, int b)

After invoking Introduce Method on code marked with asterisk
        int a = 0;       
        int b = 0;     
*       int c = a+b;
it creates method with signature

  public int existing(int b, int a)

without any warning that I already have function with same signature...

NetBeans IDE 6.0 Beta 1 (Build 200709141330)
Comment 1 Daniel Prusa 2008-02-19 14:32:24 UTC
A method which of signature matches an existing method can be produced also by Change Signature refactoring, it should
report warnings too. 
The code is not compilable, on the other hand, the change is only local and the conflict can be easily detected by the
user, I think, this is P4.
Comment 2 Jan Becicka 2008-05-15 13:24:08 UTC
Max volunteered :)
Comment 3 Jiri Prox 2009-04-27 10:37:06 UTC
*** Issue 163591 has been marked as a duplicate of this issue. ***
Comment 4 Martin Balin 2016-07-07 07:17:55 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