commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator GenericValidator.java
Date Sat, 15 Mar 2003 23:18:13 GMT
dgraham     2003/03/15 15:18:12

  Modified:    validator/src/share/org/apache/commons/validator
                        GenericValidator.java
  Log:
  Changed variable name to match coding standards.
  
  Revision  Changes    Path
  1.13      +7 -7      jakarta-commons/validator/src/share/org/apache/commons/validator/GenericValidator.java
  
  Index: GenericValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/GenericValidator.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- GenericValidator.java	13 Mar 2003 02:28:34 -0000	1.12
  +++ GenericValidator.java	15 Mar 2003 23:18:12 -0000	1.13
  @@ -309,10 +309,10 @@
       */
       protected static boolean validateCreditCardLuhnCheck(String cardNumber) {
           // number must be validated as 0..9 numeric first!!
  -        int no_digit = cardNumber.length();
  -        int oddoeven = no_digit & 1;
  +        int digits = cardNumber.length();
  +        int oddoeven = digits & 1;
           long sum = 0;
  -        for (int count = 0; count < no_digit; count++) {
  +        for (int count = 0; count < digits; count++) {
               int digit = 0;
               try {
                   digit = Integer.parseInt(String.valueOf(cardNumber.charAt(count)));
  
  
  

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


Mime
View raw message