harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Chen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6464) [classlib][luni]URLEncoder.encode(String) should same as URLEncoder.encode(String, defaultEncoding)
Date Thu, 11 Mar 2010 04:59:27 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843905#action_12843905

Ray Chen commented on HARMONY-6464:

Hi Nathan,

Thank you for your comments. My reply as below

     I checked the URLDecoder, it also has a catch for
UnsupportedCharsetException, that's why I kept the doDefautEncode(),
if it is not neccessary, I will delete it.

 >  @Deprecated
 >   public static String encode(String s) {

        Again I refered to URLDecoder,  acutally I didn't cache the
defautlEncoding at first, I guess there may be a performance concern
here. So if there is
    thread-safe problem here, URLDecoder may also have this problem.
So shall I delete this cache, and call getProperty() every time? Or
there are any better  solution?


Ray Chen

> [classlib][luni]URLEncoder.encode(String) should same as URLEncoder.encode(String, defaultEncoding)
> ---------------------------------------------------------------------------------------------------
>                 Key: HARMONY-6464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6464
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>            Priority: Minor
>         Attachments: Harmony-6464.diff
> Although URLEncoder.encode(String) is deprecated, but its behavior should be as same
as URLEncoder.encode(String, defaultEncoding)
> In which defaultEncoding = System.getProperty("file.encoding");

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message