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

small errors in Collectors examples

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • core-libs

        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.

        (Submitted by @raoulUK via Twitter)

              smarks Stuart Marks
              smarks Stuart Marks
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: