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

Patrick Concannon pconcannon at openjdk.java.net
Fri Feb 12 15:59:01 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

> _Mailing list message from [Remi Forax](mailto:forax at univ-mlv.fr) on [core-libs-dev](mailto:core-libs-dev at openjdk.java.net):_
> 
> 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 Remi, 

Well spotted. I've updated that now ... you can view the change here: 8005665

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

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


More information about the core-libs-dev mailing list