Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jdk8 stream doc bug

piscesAug 20 2018

location:

"java.util.stream.Collectors#toMap(java.util.function.Function<? super T,? extends K>, java.util.function.Function<? super T,? extends U>)",

there is bug in the doc of this jdk method,

origin:

"* Map<String, Student> studentIdToStudent
* students.stream().collect(toMap(Student::getId,
* Functions.identity());",

correct use:

"* Map<String, Student> studentIdToStudent
* students.stream().collect(toMap(Student::getId,
* Function.identity());"

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2018
Added on Aug 20 2018
0 comments
306 views