You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Brian Minchau (JIRA)" <xa...@xml.apache.org> on 2005/10/22 18:11:03 UTC
[jira] Resolved: (XALANJ-2217) [PATCH] cleaup some String usage sillyness
[ http://issues.apache.org/jira/browse/XALANJ-2217?page=all ]
Brian Minchau resolved XALANJ-2217:
-----------------------------------
Fix Version: Latest Development Code
Resolution: Fixed
The patch supplied by Dave was reviewed/approved/applied by myself. It was applied with one exception. The change to ElemNumber was not applied.
I was not convinced that these were the same for a given char, ch:
> String.valueOf(ch)
> (new Character(ch)).toString();
Perhaps they result in the same String, or perhaps in the given context for the limited range of ch values that would be used they are the same, but I was not convinced. Also, I checked if this code path was ever taken for the "build smoketest" or "build alltest.conf" test buckets. The code path was not exercised, so it also lowered my confidence.
> [PATCH] cleaup some String usage sillyness
> ------------------------------------------
>
> Key: XALANJ-2217
> URL: http://issues.apache.org/jira/browse/XALANJ-2217
> Project: XalanJ2
> Type: Improvement
> Versions: Latest Development Code
> Environment: n/a
> Reporter: Dave Brosius
> Assignee: Brian Minchau
> Priority: Trivial
> Fix For: Latest Development Code
> Attachments: silly_string_stuff.diff
>
> This patch cleans up some String class sillyness like creating an object just to convert to string, or calling toString on a String, etc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
Re: [jira] Resolved: (XALANJ-2217) [PATCH] cleaup some String usage
sillyness
Posted by Libor Valenta <li...@atypon.com>.
Hi guys,
the most readeble conversion char to String is Character.toString(char
c) which is by Sun implemented as String.valueOf(c) so the patch is
correct on that.
-- LV
Brian Minchau (JIRA) wrote:
> [ http://issues.apache.org/jira/browse/XALANJ-2217?page=all ]
>
>Brian Minchau resolved XALANJ-2217:
>-----------------------------------
>
> Fix Version: Latest Development Code
> Resolution: Fixed
>
>The patch supplied by Dave was reviewed/approved/applied by myself. It was applied with one exception. The change to ElemNumber was not applied.
>
>I was not convinced that these were the same for a given char, ch:
>
>
>> String.valueOf(ch)
>> (new Character(ch)).toString();
>>
>>
>
>Perhaps they result in the same String, or perhaps in the given context for the limited range of ch values that would be used they are the same, but I was not convinced. Also, I checked if this code path was ever taken for the "build smoketest" or "build alltest.conf" test buckets. The code path was not exercised, so it also lowered my confidence.
>
>
>
>>[PATCH] cleaup some String usage sillyness
>>------------------------------------------
>>
>> Key: XALANJ-2217
>> URL: http://issues.apache.org/jira/browse/XALANJ-2217
>> Project: XalanJ2
>> Type: Improvement
>> Versions: Latest Development Code
>> Environment: n/a
>> Reporter: Dave Brosius
>> Assignee: Brian Minchau
>> Priority: Trivial
>> Fix For: Latest Development Code
>> Attachments: silly_string_stuff.diff
>>
>>This patch cleans up some String class sillyness like creating an object just to convert to string, or calling toString on a String, etc.
>>
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org