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 12189 - interface sync - changes method instead of adding new method
Summary: interface sync - changes method instead of adding new method
Status: CLOSED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-15 05:20 UTC by onivy
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 onivy 2001-05-15 05:20:03 UTC
when an interface is changed using copy->paste->edit sync suggests to update 
the copied method in the implementing class instead of adding a new method.

to reconstruct:
1. create an interface:
public interface A {
    public void func();
}
2. create a class:
public class B implements A{
    public void func() {
    }
}
3. in A, copy the declaration of func(), and paste it in the next line. then, 
change the name to func2(). now you should have:
public interface A {
    public void func();
    public void func2();
}
4. wait for the sync
results: sync suggests to update the copied method in the implementing class 
instead of adding a new method.

note: the same happens when the method is typed. I guess it has nothing to do 
with the copy/paste rather than the parsing of two identical method declarations
Comment 1 Tomas Hurka 2001-05-18 16:48:41 UTC
This happen only if wait after copy/paste so that the interface A with two
identical methods is parsed. If you subsequently change one of them from func to
func1 Connection event is fired with the information "function func was changed
to function func2" -> this event is reflected by class B as suggestion to update
of the func method name. 
Comment 2 Quality Engineering 2003-07-01 13:10:43 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 3 Quality Engineering 2003-07-01 13:20:45 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.