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

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Feb 2 00:39:49 UTC 2017



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