harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6649) String.toLowerCase/toUpperCase incorrect for supplementary characters
Date Wed, 22 Sep 2010 23:04:32 GMT

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

Tim Ellison commented on HARMONY-6649:

You snipped the javadoc a bit too selectively.

it says:
"     * Returns the string representing this permission's actions. It must be of
     * the form "read,write,execute,delete", all lower case and in the correct
     * order if there is more than one action.

i.e.that's the characteristic of the return string, not the input string which does need to
go toLowerCase

But this is going to be ascii.

> String.toLowerCase/toUpperCase incorrect for supplementary characters
> ---------------------------------------------------------------------
>                 Key: HARMONY-6649
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6649
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M15
>            Reporter: Robert Muir
>            Assignee: Tim Ellison
>             Fix For: 5.0M15
>         Attachments: HARMONY-6649_tests.patch, harmony6649.patch
> Simple testcase:
> {code}
>     assertEquals("\uD801\uDC44", "\uD801\uDC1C".toLowerCase());
> {code}
> Looking at modules/luni/src/main/java/java/lang/String.java, the problem is these methods
iterate code units (char) not codepoints (int),
> and use Character.toLowerCase(char) and Character.toUpperCase(char), instead of Character.toLowerCase(int),
and Character.toUpperCase(int)

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

View raw message