Collectors.toMap() keyMapper function question

pfurbacher pfurbacher at mac.com
Wed Oct 9 04:19:57 UTC 2013


Thanks for the confirmation.

It looks like it is an Eclipse Kepler (4.3) BETA_8 problem.

I compiled using a Maven goal, and it had no problem with 

    Map<String, Person> map = 
        roster
            .stream()
            .collect(
                Collectors.toMap(
                    Person::getLast,
                    Function.<Person>identity()));

The STS/Eclipse nightly build required that I change <String, Person> to
<Object, Person>. It liked that better for some odd reason. 

Time to file a bug report with eclipse.org.

Thanks again for your help.



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



More information about the discuss mailing list