RFR: 8160302: Reduce number of lambdas created when loading java.util.regex.Pattern

Claes Redestad claes.redestad at oracle.com
Thu Feb 2 12:05:09 UTC 2017


Sherman, Martin, Maurizio, thanks for reviews and suggestions!

I've filed https://bugs.openjdk.java.net/browse/JDK-8173820 to deal with 
this cleanup at a later date.

/Claes

On 02/02/2017 01:39 AM, Maurizio Cimadamore wrote:
>
>
> On 01/02/17 21:12, Claes Redestad wrote:
>> As tests have been thoroughly run on this and time is running out,
>> I'd prefer contemplating cleaner/nicer ways of writing this particular
>> patch for 10 if you don't mind. 
> I believe an enum could do quite well in this particular situation - 
> when we revisit the code in 10, and lead to a more 'declarative' 
> version of the same code. For example, each enum constant could have 
> strings for storing posix/unix predicates, and a method that returns 
> your lazy method reference. That should clean up the code quite a bit.
>
> Cheers
> Maurizio



More information about the core-libs-dev mailing list