tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1050682 - /tomcat/trunk/java/org/apache/el/util/MessageFactory.java
Date Sun, 19 Dec 2010 18:18:11 GMT
2010/12/18  <markt@apache.org>:
> Author: markt
> Date: Sat Dec 18 17:43:01 2010
> New Revision: 1050682
>
> URL: http://svn.apache.org/viewvc?rev=1050682&view=rev
> Log:
> Simplify based on StringManager changes
>
> Modified:
>    tomcat/trunk/java/org/apache/el/util/MessageFactory.java
>

> +        MessageFormat mf = new MessageFormat(value);
> +        return mf.format(args, new StringBuffer(), null).toString();

JavaDoc for MessageFormat#format(Object, StringBuffer, FieldPosition)
says that using null value for pos should result in NPE. (JDK 6u22).
The MessageFormat#format(Object) uses new FieldPosition(0) there.

Anything wrong with just calling the usual static method,
MessageFormat.format(pattern, args) ?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message