Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8153157

small errors in Collectors examples

XMLWordPrintable

      In the example in the doc for Collectors.reducing(BinaryOperator), the declaration of tallestByCity should be Map<City, Optional<Person>> instead of Map<City, Person>.

      And in the example in the doc for Collectors.reducing(U, Function, BinaryOperator), the reducing() downstream collector call is missing its first (identity) argument.

            rpatil Ramanand Patil (Inactive)
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: