On 21/05/2013 4:32 PM, Florian Weimer wrote:
On 05/21/2013 07:07 AM, Mike Duigou wrote:
Since the char array is never modified it could use the String(char[],
boolean) constructor. This has advantages for cases such as logging
which may read the thread name very many times.

Couldn't we store the original string instead?

We can't** use a String instead of the char[] because of interaction from the VM with JNI attached threads.

Do you mean we should store the String as well? That would add to the memory footprint at a time when we are looking a reducing memory footprint (ala class instance size reductions).

David
-----

** rather we won't. There is a lot of history here and using a String is not impossible, but not worth the churn.

Reply via email to