groupingByConcurrent javadoc shows an example use that does not require a map factory

Arul Dhesiaseelan aruld at acm.org
Mon Jun 17 16:13:08 PDT 2013


Looks like this example in Collectors javadoc needs to be corrected for
groupingByConcurrent that does not take a map factory?

          ConcurrentMap<City, Set<String>> namesByCity
              =
people.stream().collect(groupingByConcurrent(Person::getCity, TreeMap::new,

 mapping(Person::getLastName, toSet())));

map factory should not be included in this example, as it uses the default
factory.

- Arul


More information about the lambda-dev mailing list