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 104913

Summary: Smart code completion should understand autoboxing
Product: java Reporter: _ tboudreau <tboudreau>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description _ tboudreau 2007-05-26 23:07:53 UTC
I have the following method:

public boolean isConflict (ElementHandle <ExecutableElement> method, int
paramIndex, CompilationInfo info) {
       ExecutableElement theMethod = method.resolve (info);
       Map <ExecutableElement, Set<Integer>> map = resolveSkips(info);
       Set <Integer> indicesOfParamsNotToRename = map.get(theMethod);
       return indicesOfParamsNotToRename.contains(paramIndex);
   }

When I type 
indicesOfParamsNotToRename.cont
and invoke smart code completion, it suggests "map" as the parameter to pass to
contains(), which is wrong.

In a perfect world, what it should do is understand autoboxing and detect that
the best available parameter to pass is the integer parameter "paramIndex" and
suggest that.