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

Typo in documentation of package java.util.stream

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8
    • core-libs
    • b22
    • generic
    • generic
    • Verified

      A DESCRIPTION OF THE PROBLEM :
      There is a typo at the end of this section of the package overview (right parenthesis instead of comma).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
           int sumOfWeights = widgets.stream()
                                     .reduce(0,
                                             (sum, b) -> sum + b.getWeight(),
                                             Integer::sum);
       
      ACTUAL -
           int sumOfWeights = widgets.stream()
                                     .reduce(0,
                                             (sum, b) -> sum + b.getWeight())
                                             Integer::sum);
       

      URL OF FAULTY DOCUMENTATION :
      http://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html#Reduction

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

              Created:
              Updated:
              Resolved: