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

Collectors documentation has wrong examples

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      Example of toMap() method indicates to use Funcitons.identity() method instead of Function.identity(). Notice that "s" is not required at the end of "Function".

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Example of toMap() method indicates to use Funcitons.identity() method.
      ACTUAL -
      Should use Function.identity(). Notice that "s" is not required at the end of "Function".

      URL OF FAULTY DOCUMENTATION :
      https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html

            fmatte Fairoz Matte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: