Collectors.toMap() keyMapper function question

pfurbacher pfurbacher at mac.com
Tue Oct 8 18:05:24 UTC 2013


Michael Nascimento wrote
> Person::getLast()

Thanks, but ...

Are you sure? I'm using a very recent nightly build of Eclipse BETA_8, and
that is flagged as

>    The method getLast() is undefined for the type Sources

I though method references didn't have parens at the end, so I tried

Person::getLast

and that produces

> Type mismatch: cannot convert from Map
> <
> Object,Person
> >
>  to Map
> <
> String,Person
> >

Perhaps I need to file a bug with Eclipse?

Thanks.




--
View this message in context: http://openjdk.5641.n7.nabble.com/Collectors-toMap-keyMapper-function-question-tp159371p159384.html
Sent from the OpenJDK General discussion mailing list archive at Nabble.com.



More information about the discuss mailing list