RFR: 8252399: Update mapMulti documentation to use type test pattern instead of instanceof once JEP 375 exits preview

Daniel Fuchs dfuchs at openjdk.java.net
Fri Feb 12 11:57:43 UTC 2021


On Fri, 12 Feb 2021 11:46:09 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:

> Hi,
> 
> Could someone please review my changeset for JDK-8252399: 'Update mapMulti documentation to use type test pattern instead of instanceof once JEP 375 exits preview' ?
> 
> This change updates the example code displayed in the API documentation for mapMulti to use the type test pattern introduced in [JEP375](https://openjdk.java.net/jeps/375).
> 
> Kind regards,
> Patrick

test/jdk/java/util/stream/examples/JavadocExamples.java line 59:

> 57:         }
> 58:     }
> 59:     private void expandIterable(Object o, Consumer<Object> c) { }

It would be better to keep the second example in its original form: with class C ... etc.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2544


More information about the core-libs-dev mailing list