JDK-8014383 : StringJoiner example in class description not in sync with streams API
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-05-11
  • Updated: 2013-06-14
  • Resolved: 2013-06-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b94Fixed
Related Reports
Relates :  
Description
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.

Comments
Fixed in lambda repo: http://hg.openjdk.java.net/lambda/lambda/jdk/rev/3a44a6038054
13-05-2013

Since this example belongs to "default" type of the spec we consider it a normative thing. To be non-normative it should be moved to @apiNote or @implNote sections.
12-05-2013

The example is non-normative so this shouldn't be a conformance issue. The text has already been corrected in the lambda forest, just hasn't been brought into jdk8 yet.
12-05-2013