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

StringJoiner example in class description not in sync with streams API

XMLWordPrintable

    • b94
    • Verified

      Specification for
      http://download.java.net/jdk8/docs/api/java/util/StringJoiner.html

      in b89 (initial) spec contains the following example:

       * List<Person> people = ...
       * String commaSeparatedNames =
       * people.map(p -> p.getName()).into(new StringJoiner(", ")).toString();

      there is no method Stream.into() currently so this code does not compile.

            psandoz Paul Sandoz
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: