commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwinterfe...@apache.org
Subject cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator GenericTypeValidator.java
Date Tue, 02 Apr 2002 03:28:52 GMT
dwinterfeldt    02/04/01 19:28:52

  Modified:    validator/src/share/org/apache/commons/validator
                        GenericTypeValidator.java
  Log:
  Moved try catch block in result formatCreditCard.
  
  Revision  Changes    Path
  1.3       +7 -7      jakarta-commons/validator/src/share/org/apache/commons/validator/GenericTypeValidator.java
  
  Index: GenericTypeValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/GenericTypeValidator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GenericTypeValidator.java	2 Apr 2002 01:59:11 -0000	1.2
  +++ GenericTypeValidator.java	2 Apr 2002 03:28:52 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/GenericTypeValidator.java,v
1.2 2002/04/02 01:59:11 dwinterfeldt Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/04/02 01:59:11 $
  + * $Header: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/GenericTypeValidator.java,v
1.3 2002/04/02 03:28:52 dwinterfeldt Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/04/02 03:28:52 $
    *
    * ====================================================================
    *
  @@ -77,7 +77,7 @@
    * validation performed.</p>
    *
    * @author David Winterfeldt
  - * @version $Revision: 1.2 $ $Date: 2002/04/02 01:59:11 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/02 03:28:52 $
   */
   public class GenericTypeValidator implements Serializable {
       
  @@ -250,11 +250,11 @@
       public static Integer formatCreditCard(String value) {
          Integer result = null;
          
  -       if (GenericValidator.validateCreditCardLuhnCheck(value) && GenericValidator.validateCreditCardPrefixCheck(value))
{
  -          try {
  +       try {
  +          if (GenericValidator.validateCreditCardLuhnCheck(value) && GenericValidator.validateCreditCardPrefixCheck(value))
{
                result = new Integer(value);
  -          } catch (Exception e) {
             }
  +       } catch (Exception e) {
          }
          
          return result;
  
  
  

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


Mime
View raw message