[10] RFR 8134512 : provide Alpha-Numeric (logical) Comparator

Claes Redestad claes.redestad at oracle.com
Fri Sep 29 15:09:16 UTC 2017

On 2017-09-28 16:22, Jason Mehrens wrote:
> Admittedly this is more of a Claes Redestad faster boot up type change but, the use of the AlphaDecimalComparator constructor in Comparator might force the bytecode verifier to force load AlphaDecimalComparator just to check the return type.
> If you make factory methods in AlphaDecimalComparator you can usually craft the return type to match and the verify of Comparator will not force load the AlphaDecimalComparator.
> Otherwise, the more ugly solution is to wrap 'new' with Comparator.class.cast.
> Jason

... you called? :-)

You're probably right in the general case, but I think we avoid this 
particular startup issue here since the (HotSpot) bytecode verifier by 
default doesn't check classes defined to the the boot loader.


More information about the core-libs-dev mailing list