RFR (S) 8059677: Thread.getName() instantiates Strings

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Nov 10 14:08:51 UTC 2014

Hi Chris,

Thanks for taking a look!

On 11/10/2014 02:52 PM, Chris Hegarty wrote:
> Trivially, after your changes will NPE be thrown if setName(null), as it
> is today ?

There is no way it could throw NPE now, therefore the behavior is
different. The spec says nothing about NPE though, but it feels wrong to
pass the null String to setNativeName. I should add
Objects.requireNonNull there. Will wait for more feedbacks, and update
the webrev.


More information about the core-libs-dev mailing list