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 203694 - Java "Create Method" fix is not offered when call is to an external nonexistent method that is already overloaded
Summary: Java "Create Method" fix is not offered when call is to an external nonexiste...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 217316 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-14 07:52 UTC by dbell
Modified: 2016-07-07 07:17 UTC (History)
2 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 dbell 2011-10-14 07:52:22 UTC
[ JDK VERSION : 1.6.26 ]

Java "Create Method" fix is not offered when call is to a nonexistent method of
another class that is already overloaded.

Example:
public class Doer {
    public void doSomething(String stringParam, String secondString) {
    }
    
    public void doSomething(String stringParam, String secondString,
Map<String, List<String>> mapParam) {        
    }
}

public class Invoker {
    public void invoke() {
        Doer doer = new Doer();
        doer.doSomething("a string", "another string", "a third string");
        doer.doSomethingElse("a string", "another string", "a third string");
        this.doSomething("a string", "another string", "a third string");
    }

public void doSomething(String stringParam, String secondString) {
    }
    
    public void doSomething(String stringParam, String secondString,
Map<String, List<String>> mapParam) {        
    }
}

All three method calls have errors. They differ, however, in the fixes the
editor offers for them. The first call (to doer.doSomething()) has no fixes
offered. The second call has "Create method..." offered. The third has two
"Change method signature" fixes available (one for each local method by the
same name).


Expected Behaviour:
Ideally, the "Create method" fix would be available in all of these situations,
and the "Change method signature" fix would _also_ be available when
appropriate.
Comment 1 Jan Lahoda 2013-02-26 21:35:49 UTC
*** Bug 217316 has been marked as a duplicate of this bug. ***
Comment 2 Jan Lahoda 2013-07-15 07:10:47 UTC
In the current trunk builds, Create Method fixes are available in all these cases. Assigning to Ralph to look at the Change Signature fix.
Comment 3 Martin Balin 2016-07-07 07:17:49 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