commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: svn commit: r962306 - in /commons/proper/math/trunk/src/main: java/org/apache/commons/math/analysis/interpolation/ java/org/apache/commons/math/exception/ java/org/apache/commons/math/util/ resources/META-INF/localization/
Date Fri, 09 Jul 2010 15:59:25 GMT
Le 09/07/2010 01:45, erans@apache.org a écrit :
> Author: erans

>      /** {@inheritDoc} */
>      @Override
>      public String getMessage() {
> -        return MessageFactory.buildMessage(Locale.US, pattern, arguments);
> +        final StringBuilder sb = new StringBuilder();
> +
> +        if (specific != null) {
> +            sb.append(MessageFactory.buildMessage(Locale.US, specific, arguments));
> +            sb.append(": ");
> +        }
> +        sb.append(MessageFactory.buildMessage(Locale.US, general, arguments));
> +
> +        return sb.toString();
>      }
>      
>      /** {@inheritDoc} */
>      @Override
>      public String getLocalizedMessage() {
> -        return MessageFactory.buildMessage(Locale.getDefault(), pattern, arguments);
> +        final StringBuilder sb = new StringBuilder();
> +
> +        if (specific != null) {
> +            sb.append(MessageFactory.buildMessage(Locale.getDefault(), specific, arguments));
> +            sb.append(": ");
> +        }
> +        sb.append(MessageFactory.buildMessage(Locale.getDefault(), general, arguments));
> +
> +        return sb.toString();

I don't how we can use the same arguments in both the general and
specific messages and later combine them together. How is this different
from a more complete message ?

Luc

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


Mime
View raw message