commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1441678 - in /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator: CreditCardValidator.java Field.java FormSet.java UrlValidator.java routines/ISBNValidator.java
Date Sat, 02 Feb 2013 01:31:07 GMT
Author: sebb
Date: Sat Feb  2 01:31:07 2013
New Revision: 1441678

URL: http://svn.apache.org/viewvc?rev=1441678&view=rev
Log:
Make private variables final where possible

Modified:
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/CreditCardValidator.java
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/Field.java
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/FormSet.java
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/UrlValidator.java
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/CreditCardValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/CreditCardValidator.java?rev=1441678&r1=1441677&r2=1441678&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/CreditCardValidator.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/CreditCardValidator.java
Sat Feb  2 01:31:07 2013
@@ -82,7 +82,7 @@ public class CreditCardValidator {
     /**
      * The CreditCardTypes that are allowed to pass validation.
      */
-    private Collection cardTypes = new ArrayList();
+    private final Collection cardTypes = new ArrayList();
 
     /**
      * Create a new CreditCardValidator with default options.

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/Field.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/Field.java?rev=1441678&r1=1441677&r2=1441678&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/Field.java (original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/Field.java Sat
Feb  2 01:31:07 2013
@@ -124,7 +124,7 @@ public class Field implements Cloneable,
      * synchronized so a call to setDepends() (which clears the List) won't
      * interfere with a call to isDependency().
      */
-    private List dependencyList = Collections.synchronizedList(new ArrayList());
+    private final List dependencyList = Collections.synchronizedList(new ArrayList());
 
     /**
      * @deprecated Subclasses should use getVarMap() instead.

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/FormSet.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/FormSet.java?rev=1441678&r1=1441677&r2=1441678&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/FormSet.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/FormSet.java
Sat Feb  2 01:31:07 2013
@@ -59,13 +59,13 @@ public class FormSet implements Serializ
      * A <code>Map</code> of <code>Form</code>s using the name field
of the
      * <code>Form</code> as the key.
      */
-    private Map forms = new HashMap();
+    private final Map forms = new HashMap();
 
     /**
      * A <code>Map</code> of <code>Constant</code>s using the name
field of the
      * <code>Constant</code> as the key.
      */
-    private Map constants = new HashMap();
+    private final Map constants = new HashMap();
 
     /**
      * This is the type of <code>FormSet</code>s where no locale is specified.

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/UrlValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/UrlValidator.java?rev=1441678&r1=1441677&r2=1441678&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/UrlValidator.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/UrlValidator.java
Sat Feb  2 01:31:07 2013
@@ -168,12 +168,12 @@ public class UrlValidator implements Ser
     /**
      * Holds the set of current validation options.
      */
-    private Flags options = null;
+    private final Flags options;
 
     /**
      * The set of schemes that are allowed to be in a URL.
      */
-    private Set allowedSchemes = new HashSet();
+    private final Set allowedSchemes = new HashSet();
 
     /**
      * If no schemes are provided, default to this set.

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java?rev=1441678&r1=1441677&r2=1441678&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
Sat Feb  2 01:31:07 2013
@@ -86,10 +86,10 @@ public class ISBNValidator implements Se
 
 
     /** ISBN-10 Code Validator */
-    private CodeValidator isbn10Validator = new CodeValidator(ISBN10_REGEX, 10, ISBN10CheckDigit.ISBN10_CHECK_DIGIT);
+    private final CodeValidator isbn10Validator = new CodeValidator(ISBN10_REGEX, 10, ISBN10CheckDigit.ISBN10_CHECK_DIGIT);
 
     /** ISBN-13 Code Validator */
-    private CodeValidator isbn13Validator = new CodeValidator(ISBN13_REGEX, 13, EAN13CheckDigit.EAN13_CHECK_DIGIT);
+    private final CodeValidator isbn13Validator = new CodeValidator(ISBN13_REGEX, 13, EAN13CheckDigit.EAN13_CHECK_DIGIT);
 
     private final boolean convert;
 



Mime
View raw message