harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5323) [classlib][text][Tomcat] MessageFormat.format can not format messages with more then 10 variables
Date Tue, 18 Dec 2007 11:26:43 GMT

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

Alexey Petrenko commented on HARMONY-5323:
------------------------------------------

Here is a test case:

=== cut ===
import java.text.MessageFormat;
import java.util.Arrays;


public class Harmony5323Test {
    private static final String testString =
        "bgcolor=\"{10}\"";

    public static void main(String[] args) {
    	Object []messageArgs = new Object[11];
    	Arrays.fill(messageArgs, "dumb");
    	
		String res = MessageFormat.format(testString, messageArgs);
		System.err.println(res);
	}
}
=== cut ===

It fails with any number higher or equal to 10. And passes with numbers between 0 and 9.
Always passes on RI.

> [classlib][text][Tomcat] MessageFormat.format can not format messages with more then
10 variables
> -------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5323
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5323
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M4
>            Reporter: Alexey Petrenko
>            Priority: Critical
>
> MessageFromat.format can not format messages with more then 10 variables. It throws the
following exception:
> === cut ===
> java.lang.IllegalArgumentException: Missing element format
> 	at java.text.MessageFormat.parseVariable(MessageFormat.java:666)
> 	at java.text.MessageFormat.applyPattern(MessageFormat.java:115)
> 	at java.text.MessageFormat.<init>(MessageFormat.java:82)
> 	at java.text.MessageFormat.format(MessageFormat.java:431)
> 	at MessageFormatTest.main(MessageFormatTest.java:13)
> === cut ===
> This issue is discovered in Tomcat-Harmony bundle and prevent Tomcat Manager application
from execution.

-- 
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