harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1014) [classlib][text] ChoiceFormat.applyPattern(..) produces stack overflow
Date Tue, 08 May 2007 07:31:15 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494207
] 

Mikhail Markov commented on HARMONY-1014:
-----------------------------------------

I also could not reproduce this issue on latest svn snapshot.
I think this issue could be closed as it's not reproducible for a long time.

> [classlib][text] ChoiceFormat.applyPattern(..) produces stack overflow
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-1014
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1014
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: WindowsXP
>            Reporter: Mikhail Fursov
>
> Here is test:
>                 Locale[] locales = Locale.getAvailableLocales();
>                 for (int i=0; i<locales.length;i++) {
>                         Locale l = locales[i];
>                         Locale.setDefault(l);
>                         System.out.println("Locale " + l);
>                         DecimalFormat format = (DecimalFormat) DecimalFormat.getInstance();
>                         System.out.println("Currency "+format.getCurrency()); 
>                         System.out.println("----\n\n"); 
>                 }
>                 System.err.println("Done!");
> and stacktrace:
> ......
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:344)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:332)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:263)
>         at java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:83)
>         at java.text.ChoiceFormat.<init>(ChoiceFormat.java:65)
>         at com.ibm.icu.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:613)
>         at com.ibm.icu.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:58)
>         at java.text.DecimalFormat.<init>(DecimalFormat.java:88)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:279)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:344)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:332)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:263)
>         at java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:83)
>         at java.text.ChoiceFormat.<init>(ChoiceFormat.java:65)
>         at com.ibm.icu.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:613)
>         at com.ibm.icu.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:58)
>         at java.text.DecimalFormat.<init>(DecimalFormat.java:88)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:279)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:344)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:332)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:263)
>         at java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:83)
>         at java.text.ChoiceFormat.<init>(ChoiceFormat.java:65)
>         at com.ibm.icu.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:613)
>         at com.ibm.icu.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:58)
>         at java.text.DecimalFormat.<init>(DecimalFormat.java:88)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:279)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:344)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:332)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:263)
>         at java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:83)
>         at java.text.ChoiceFormat.<init>(ChoiceFormat.java:65)
>         at com.ibm.icu.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:613)
>         at com.ibm.icu.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:58)
>         at java.text.DecimalFormat.<init>(DecimalFormat.java:88)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:279)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:344)
>         at java.text.NumberFormat.getNumberInstance(NumberFormat.java:332)
>         at java.text.NumberFormat.getInstance(NumberFormat.java:263)
>         at Test.main(Test.java:19)
> Proposed fix: 
> remove rependency from NumberFormat and use Double.parseDouble to parse numeric values.

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


Mime
View raw message