RFR: 8252399: Update mapMulti documentation to use type test pattern instead of instanceof once JEP 375 exits preview [v3]
Remi Forax
forax at univ-mlv.fr
Fri Feb 12 12:40:32 UTC 2021
Hi Patrick,
"Iterable" is Ok as runtime type of the classical instanceof but not in a type pattern where it is a raw type,
so
if (e instanceof Iterable elements) {
should be
if (e instanceof Iterable<?> elements) {
regards,
Rémi
----- Mail original -----
> De: "Patrick Concannon" <pconcannon at openjdk.java.net>
> À: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Vendredi 12 Février 2021 13:16:00
> Objet: Re: RFR: 8252399: Update mapMulti documentation to use type test pattern instead of instanceof once JEP 375 exits
> preview [v3]
>> 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
>
> Patrick Concannon has updated the pull request incrementally with one additional
> commit since the last revision:
>
> 8252399: Added more appropriate test stream for Expand Iterable example
>
> -------------
>
> Changes:
> - all: https://git.openjdk.java.net/jdk/pull/2544/files
> - new: https://git.openjdk.java.net/jdk/pull/2544/files/1b8ca544..8f8dfe5c
>
> Webrevs:
> - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2544&range=02
> - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2544&range=01-02
>
> Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
> Patch: https://git.openjdk.java.net/jdk/pull/2544.diff
> Fetch: git fetch https://git.openjdk.java.net/jdk pull/2544/head:pull/2544
>
> PR: https://git.openjdk.java.net/jdk/pull/2544
More information about the core-libs-dev
mailing list