You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dg...@apache.org on 2003/06/05 03:17:43 UTC

cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator ValidatorResources.java

dgraham     2003/06/04 18:17:43

  Modified:    validator/src/share/org/apache/commons/validator
                        ValidatorResources.java
  Log:
  Fixed NPE in deprecated get() methods for PR# 20432.
  
  Revision  Changes    Path
  1.23      +9 -7      jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java
  
  Index: ValidatorResources.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ValidatorResources.java	29 May 2003 03:34:35 -0000	1.22
  +++ ValidatorResources.java	5 Jun 2003 01:17:43 -0000	1.23
  @@ -330,7 +330,8 @@
        * @deprecated Use getForm() instead.
        */
       public Form get(Locale locale, Object formKey) {
  -        return this.getForm(locale, formKey.toString());
  +        String key = (formKey == null) ? null : formKey.toString();
  +        return this.getForm(locale, key);
       }
       
       /**
  @@ -369,8 +370,9 @@
           String country,
           String variant,
           Object formKey) {
  -
  -        return this.getForm(language, country, variant, formKey.toString());
  +            
  +		String key = (formKey == null) ? null : formKey.toString();
  +		return this.getForm(language, country, variant, key);
       }
       
       /**
  
  
  

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