I may be being stupid, but is there a logic error here:
public String interpolate(String string, Object... params) {
| if ( params.length>10 )
| {
| throw new IllegalArgumentException("more than 10 parameters");
| }
| if ( string.indexOf('#')>=0 )
| {
| string = interpolateExpressions(string, params);
| }
| if ( params.length>1 && string.indexOf('{')>=0 )
| {
| string = new MessageFormat(string, Locale.instance()).format(params);
| }
| return string;
| }
Should the
if ( params.length>1 && string.indexOf('{')>=0 )
actually read
if ( params.length>0 && string.indexOf('{')>=0 )
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001868#4001868
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001868
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user