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

Guava javadoc in Java SE 8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u45
    • 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-

            psandoz Paul Sandoz
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: