RRF: 8187123: (reflect) Class#getCanonicalName and Class#getSimpleName is a part of performance issue

Claes Redestad claes.redestad at oracle.com
Wed May 2 12:45:49 UTC 2018


On 2018-04-30 23:28, Paul Sandoz wrote:
> I am not quite 100% sure but you could probably replace the null sentinel value with “/“ or opportunistically “[]”, but i cannot quite tell what exactly is an invalid binary name. Anyway that is not important.

I tried reading the relevant parts of the JLS and can't be 100% 
confident any such String can't be made the binary class name of some 
generated class. A new String() is a very cheap way to be sure 
correctness here.

/Claes


More information about the core-libs-dev mailing list