]> git.mxchange.org Git - addressbook-lib.git/blobdiff - src/org/mxchange/addressbook/validator/user/UserIdValidator.java
renamed number -> userId to make it more clear + updated jar(s)
[addressbook-lib.git] / src / org / mxchange / addressbook / validator / user / UserIdValidator.java
index a3ff257869ad9c995204127790f0d4cbda2137cd..ddd1ef76c1803c8a64aaf6a057a0656a70e1b999 100644 (file)
@@ -76,27 +76,27 @@ public class UserIdValidator extends BaseLongValidator implements Validator {
                super.preValidate(context, component, value, requiredFileds, false);
 
                // Cast value
-               Long number = (Long) value;
+               Long userId = (Long) value;
 
                // Define variable
                Boolean ifUserExists = false;
 
                // Is a map entry there?
-               if (this.cachedStatus.containsKey(number)) {
+               if (this.cachedStatus.containsKey(userId)) {
                        // Get from cache
-                       ifUserExists = this.cachedStatus.get(number);
+                       ifUserExists = this.cachedStatus.get(userId);
                } else {
                        // Get status
-                       ifUserExists = this.userBean.ifUserIdExists(number);
+                       ifUserExists = this.userBean.ifUserIdExists(userId);
 
                        // Add to cache
-                       this.cachedStatus.put(number, ifUserExists);
+                       this.cachedStatus.put(userId, ifUserExists);
                }
 
                // Is the address book id valid?
                if (!ifUserExists) {
                        // Is not valid
-                       throw new ValidatorException(new FacesMessage(MessageFormat.format("No user found with id {0}. Please check your link.", number))); //NOI18N
+                       throw new ValidatorException(new FacesMessage(MessageFormat.format("No user found with id {0}. Please check your link.", userId))); //NOI18N
                }
 
                // Trace message