You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dg...@apache.org on 2003/07/02 05:34:04 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/util MessageResources.java

dgraham     2003/07/01 20:34:04

  Modified:    src/share/org/apache/struts/util MessageResources.java
  Log:
  Simplified getMessage to construct an array in the method call.
  
  Revision  Changes    Path
  1.17      +12 -14    jakarta-struts/src/share/org/apache/struts/util/MessageResources.java
  
  Index: MessageResources.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/util/MessageResources.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- MessageResources.java	9 Nov 2002 04:04:11 -0000	1.16
  +++ MessageResources.java	2 Jul 2003 03:34:04 -0000	1.17
  @@ -432,17 +432,15 @@
        * @param arg2 The replacement for placeholder {2} in the message
        * @param arg3 The replacement for placeholder {3} in the message
        */
  -    public String getMessage(Locale locale,
  -			     String key, Object arg0, Object arg1,
  -			     Object arg2, Object arg3) {
  -
  -	Object args[] = new Object[4];
  -	args[0] = arg0;
  -	args[1] = arg1;
  -	args[2] = arg2;
  -	args[3] = arg3;
  -	return (getMessage(locale, key, args));
  +    public String getMessage(
  +        Locale locale,
  +        String key,
  +        Object arg0,
  +        Object arg1,
  +        Object arg2,
  +        Object arg3) {
   
  +        return this.getMessage(locale, key, new Object[] { arg0, arg1, arg2, arg3 });
       }
   
   
  
  
  

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