On Sat, 31 Oct 2020 16:45:06 GMT, Kartik Ohri 
<github.com+27751938+amcap1...@openjdk.org> wrote:

>> Hi all,
>> This PR intends to add filter, map and flatMap methods to the Optional 
>> classes for primitives. The rationale is consistency with the Optional class 
>> for objects and user convenience.
>> Thanks.
>> Regards,
>> Kartik
>
> Kindly review the patch. Thanks in advance!

Hi !
thanks for taking the time to craft that pull request but this is typically the 
kind of patch that should be discussed on the mailing list first before 
creating a pull request.

There are several issues, one is that we want to retrofit OptionalInt, 
OptionalLong, etc to be Optional<int>, Optional<long> as part of project 
Valhalla so we don't want to add more methods in the primitive variants of 
Optional and Stream to avoid to be blocked later while trying retrofitting 
those classes due to these methods.
So we know that some methods are missing but we want to know first how the 
specialization of generics over primitive types works before adding those 
methods.

The second issue is that when you want to change the public API of the JDK, you 
have to create a CSR to ask to the CSR guys/girls leaded by Joe Darcy if the 
signature and the semantics of the methods you want to add are coherent with 
the rest of the API.

I recommend you to start by fixing bugs because those can be fixed by a simple 
pull request.

regards,
Rémi

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

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

Reply via email to