Bug 495571 - Java 8 Lambda toMap does not auto complete correctly
Summary: Java 8 Lambda toMap does not auto complete correctly
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-07 02:13 EDT by ugur ata CLA
Modified: 2022-10-22 14:31 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ugur ata CLA 2016-06-07 02:13:15 EDT
I am trying to map an entity list using an attribute as the key but auto complete considers entity as Object type and only shows Object methods. When I type the method name no errors shown though.


void method(List<CustomTable> tables) {
     private Map<String, CustomTable> tablesMap;

     tablesMap = tables.stream().collect(Collectors.toMap(t -> t.getName(), t -> t));
}

This code works but auto complete does not show options for CustomTable entity but only from Object type.
Comment 1 ugur ata CLA 2016-06-07 02:14:21 EDT
I am using 4.6 RC3 of Java EE Edition
Comment 2 Zohar Cohen CLA 2018-07-18 01:01:44 EDT
Do you know in which eclipse version this issue was fixed?

I have the same issue withe the auto complete of:

mapEx =mapEx.entrySet().stream.collect(Collectors.toMap(e->e.getKey.substring(0,8),e->e.getValue));
Comment 3 Dani Megert CLA 2018-07-21 11:48:23 EDT
(In reply to Zohar Cohen from comment #2)
> Do you know in which eclipse version this issue was fixed?

Who said it is fixed?
Comment 4 Eclipse Genie CLA 2020-08-13 14:29:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Eclipse Genie CLA 2022-10-22 14:31:44 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.