[ http://issues.apache.org/jira/browse/HARMONY-1081?page=all ]
Paulex Yang resolved HARMONY-1081.
----------------------------------
Resolution: Fixed
Denis, patch applied at revision r429685with modifications, I add special handling for Double.NaN
case and related test code, thanks a lot for this enhancement, please verify that the problem
is fully fixed as you expected.
> [classlib][lang] ChoiceFormat.format(double, StringBuffer, FieldPosition) throws unexpected
ArrayIndexOutOfBoundsException
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1081
> URL: http://issues.apache.org/jira/browse/HARMONY-1081
> Project: Harmony
> Issue Type: Bug
> Reporter: Denis Kishenko
> Assigned To: Paulex Yang
> Attachments: 1081-ChoiceFormat.patch, 1081-ChoiceFormatTest.patch
>
>
> Test ----------------------------------------------------------------
> import java.text.*;
> public class bug9410 {
> public static void main(String[] args) {
> try {
> ChoiceFormat fr = new ChoiceFormat("|");
> StringBuffer tmp = new StringBuffer();
> FieldPosition pos = new FieldPosition(6);
> StringBuffer buf = fr.format(1, tmp, pos);
> System.out.println("buf.length=" + buf.length());
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> Output -----------------------------------------------------------------------------
> RI
> buf.length=0
> Harmony
> java.lang.ArrayIndexOutOfBoundsException
> at java.text.ChoiceFormat.format(ChoiceFormat.java:211)
> at java.text.ChoiceFormat.format(ChoiceFormat.java:228)
> at bug9410.main(bug9410.java:10)
--
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
|