Collectors.toMap documentation makes reference to incorrect class name

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 8u25
    • Component/s: core-libs

      A DESCRIPTION OF THE PROBLEM :
      The documentation makes repeated reference to "Functions.identity()" in code samples, e.g.:

           Map<Student, Double> studentToGPA
               students.stream().collect(toMap(Functions.identity(),
                                               student -> computeGPA(student)));
       
      Such a class does not exist. It should read "Function.identity()".


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Function.identity()
      ACTUAL -
      Functions.identity()

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

            Assignee:
            Paul Sandoz
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: