updated coding rules.
[utils] / security / src / main / java / org / wamblee / usermgt / RegexpNameValidator.java
index fdc220f22d03a8bc24e20e1b1f85d7d7b1daf328..9d1421b46951adcce86899ffa51993c55020c044 100644 (file)
@@ -20,6 +20,8 @@ import org.wamblee.usermgt.UserMgtException.Reason;
 
 /**
  * Validation of names based on a regular expression. 
+ *
+ * @author Erik Brakkee
  */
 public class RegexpNameValidator implements NameValidator {
     
@@ -36,17 +38,17 @@ public class RegexpNameValidator implements NameValidator {
     /**
      * Pattern to use. 
      */
-    private String _pattern;
+    private String pattern;
     
     /**
      * Reason to use when validation fails. 
      */
-    private Reason _reason; 
+    private Reason reason; 
     
     /**
      * Message to report. 
      */
-    private String _message; 
+    private String message; 
     
     /**
      * Validates a regular expression. 
@@ -55,9 +57,9 @@ public class RegexpNameValidator implements NameValidator {
      * @param aMessage Message to report. 
      */
     public RegexpNameValidator(String aPattern, Reason aReason, String aMessage) { 
-        _pattern = aPattern; 
-        _reason = aReason;
-        _message = aMessage; 
+        pattern = aPattern; 
+        reason = aReason;
+        message = aMessage; 
     }
     
     /**
@@ -75,8 +77,8 @@ public class RegexpNameValidator implements NameValidator {
      * @see org.wamblee.usermgt.NameValidator#validate(java.lang.String)
      */
     public void validate(String aName) throws UserMgtException {
-        if ( !aName.matches(_pattern)) { 
-            throw new UserMgtException(_reason, _message); 
+        if ( !aName.matches(pattern)) { 
+            throw new UserMgtException(reason, message); 
         }
     }