tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54017] new String instance is generated for constant string in Generator.convertString
Date Tue, 04 Dec 2012 11:49:48 GMT

--- Comment #2 from Konstantin Kolinko <> ---
Regarding this fix ( r1402122 r1402123 ),

The JSP 2.2 spec chapter JSP. "Conversions from String values"
defines conversion to an Object as

"As if new String(string-literal). This results in new String("")
if the string is empty."

This should be the reason for the original code changed by this fix.

Actually I agree with OP and Mark and I see no good reason to use a
String(String) constructor here.

The only good point I see in String(String) constructor is that it trims the
backing char array to contain only the needed count of characters, but I do not
think it is important here.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message