Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Limit in number of patterns in MessageFormat

  Asked By: Pamela    Date: Apr 26    Category: Java    Views: 1025
  

Is there a limit to the number of patterns in MessageFormat? I'm
getting an "IllegalArgumentException: argument number too large" when
there are more than 10 patterns. For example,

Object[] args = { "." };
String msg = "{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}";
System.out.println( MessageFormat.format(msg, args) );

will cause the exception. If I remove one of the {0}, then it works
OK. Is this a known limitation, and is there another workaround,
other than to break it up into chunks with less than 10 patterns?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Limit in number of patterns in MessageFormat Or get search suggestion and latest updates.




Tagged: