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 252329

Summary: method and property completion on implicit lambda parameter assumes the type to be Object until parenthesis are added
Product: java Reporter: mimfgg
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description mimfgg 2015-05-10 12:29:03 UTC
Hi!

Since version 8.0.1, the code completion popup on lambda parameters seems to be "broken" in some cases. 

Assuming that *ctrl-space* is where the cursor is when I press ctrl-space and expect to see the code completion popup


The following code will produce the proper popup for the an object of Type Sample:

   List<Sample> samples = new ArrayList<>();
   samples.forEach((Sample sample) -> sample.*ctrl-space*);

The following will display only the methods of the Object class:

   List<Sample> samples = new ArrayList<>();
   samples.forEach(sample -> sample.*ctrl-space*);

Except if parenthesis are added after the '.' then it works :

   List<Sample> samples = new ArrayList<>();
   samples.forEach(sample -> sample.*ctrl-space*());

I couldn't find anything describing this behavior in the current bugs. Is that a known bug? This is pretty annoying to have to type ( and then go back one character to have proper code completion ... :D
Comment 1 Jiri Prox 2015-05-11 08:48:19 UTC
reproducible