You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/08/07 15:55:14 UTC
[jira] Updated: (HARMONY-1081) [classlib][lang]
ChoiceFormat.format(double, StringBuffer, FieldPosition) throws unexpected
ArrayIndexOutOfBoundsException
[ http://issues.apache.org/jira/browse/HARMONY-1081?page=all ]
Denis Kishenko updated HARMONY-1081:
------------------------------------
Attachment: 1081-ChoiceFormat.patch
Fix and small optimization.
> [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
> Attachments: 1081-ChoiceFormat.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