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

toMap method javadoc contains incorrect reference to Functions.identity() (should be Function.identity())

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 8u102
    • core-libs

      FULL PRODUCT VERSION :
      java version "1.8.0_77"
      Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
      Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 10 anniversary edition

      A DESCRIPTION OF THE PROBLEM :
      In the Javadoc of java.util.stream.Collectors, methods

      toMap(Function<? super T,? extends K> keyMapper,
                                                          Function<? super T,? extends U> valueMapper)

      toConcurrentMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper)

      code samples are provided referencing non-existent method Functions.identity().
      This should be Function.identity().


      REGRESSION. Last worked in version 8u77

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Check provided javadoc in JDK release / check web javadoc @ docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html


      REPRODUCIBILITY :
      This bug can be reproduced always.

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

              Created:
              Updated:
              Resolved: