Guava javadoc in Java SE 8

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 8u45
    • Component/s: docs
    • x86
    • other

      A DESCRIPTION OF THE PROBLEM :
      Guava's Functions class is mentioned in 4 examples while in Java SE 8, the name of the utility class is without an ending "s" (Function.identity()).
      https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html#toMap-java.util.function.Function-java.util.function.Function-
      https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html#toConcurrentMap-java.util.function.Function-java.util.function.Function-

      While fixing that part of the javadoc, it would be better to put an equal "=" to assign the values in the examples of this class, like here:
      Map<Student, Double> studentToGPA =
               students.stream().collect(toMap(Functions.identity(),
                                               student -> computeGPA(student)));


      URL OF FAULTY DOCUMENTATION :
      https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html#toMap-java.util.function.Function-java.util.function.Function-

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

              Created:
              Updated:
              Resolved: