harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Hu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-1514) [classlib][util] Locale.getAvailableLocales returns duplicate data
Date Thu, 21 Sep 2006 08:59:23 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1514?page=all ]

Robert Hu updated HARMONY-1514:

    Attachment: patch.diff

Replace locales array to a LinkedHashSet in java.util.Locale.find(String prefix)
Set can filter duplicate locales.
LinkedHashSet can keep the order.
Pls. try this patch.

> [classlib][util] Locale.getAvailableLocales returns duplicate data
> ------------------------------------------------------------------
>                 Key: HARMONY-1514
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1514
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Robert Hu
>            Priority: Minor
>         Attachments: patch.diff
> Following test shows that Harmony returns duplicate data.
>             Locale[] locales = Locale.getAvailableLocales();
>             Set<Locale> localesSet = new HashSet<Locale>(Arrays.asList(locales));
>             assertEquals(localesSet.size(),locales.length);
> RI: Pass
> Harmony: junit.framework.AssertionFailedError: expected:<190> but was:<380>
> If we print out locales by "System.out.println(Arrays.toString(locales));" on Harmony,
we'll find that Harmony print out all the locales twice. It's the reason why above test case
fails. (Set will filter the same locales).

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


View raw message