[
https://issues.apache.org/jira/browse/FLEX-17210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14558751#comment-14558751
]
Alex Harui commented on FLEX-17210:
-----------------------------------
It is always risky to change behavior. Although it appears that nobody has
complained in the year since the change to throw the exception, you never know
when somebody has been relying on this behavior and finally gets around to
upgrading to this version of Apache Flex. IMO, it isn't necessarily wrong to
set the locale chain to a locale that isn't compiled in. You might be
injecting/loading the locale on the next line of your code.
It looks like the change was in ae28ab34c558957927471d54ce2a0ca6aace6207. I'm
not clear how this change results in the expected result. I would think an
exception would stop execution in the test case. Perhaps the bug filer really
wanted resourceManager to drop back to an existing locale? Checking for the
existence of the locale when actually needed vs when the localeChain is set
might be a safer change, or as mentioned earlier, just tracing out a warning.
> mx:NumberFormatter failed when use localeChain
> ----------------------------------------------
>
> Key: FLEX-17210
> URL: https://issues.apache.org/jira/browse/FLEX-17210
> Project: Apache Flex
> Issue Type: Bug
> Components: Formatters
> Affects Versions: Adobe Flex SDK Previous
> Environment: Affected OS(s): Windows
> Affected OS(s):
> Language Found: English
> Reporter: Adobe JIRA
> Assignee: Justin Mclean
> Labels: easytest
>
> Steps to reproduce:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute" creationComplete="onCC();">
> <mx:Script>
> <![CDATA[
> import mx.formatters.NumberFormatter;
>
> private function onCC():void
> {
> var nf:NumberFormatter = new NumberFormatter();
> nf.precision = 2;
> resourceManager.localeChain = ['zh-Hans'];
>
> trace("number:"+nf.format(1/3));
> resourceManager.localeChain = ['en_US'];
> trace("number:"+nf.format(1/3));
> }
> ]]
> >
> </mx:Script>
> </mx:WindowedApplication>
>
> Actual Results:
>
> number:
> number:0.33
>
> Expected Results:
>
> number:0.33
> number:0.33
>
> Workaround (if any):
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)