Collectors.toMap() keyMapper function question

Michael Nascimento misterm at gmail.com
Tue Oct 8 18:23:06 UTC 2013


Sorry, it should be Person::getLast. It should work, afaik.

Regards,
Michael

On Tue, Oct 8, 2013 at 3:05 PM, pfurbacher <pfurbacher at mac.com> wrote:
> 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