]> git.mxchange.org Git - jcoreee.git/commitdiff
Renamed variable to make it more clear
authorRoland Haeder <roland@mxchange.org>
Tue, 25 Aug 2015 16:06:32 +0000 (18:06 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 25 Aug 2015 16:06:32 +0000 (18:06 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jsfcore/validator/BaseObjectValidator.java
src/org/mxchange/jsfcore/validator/string/BaseStringValidator.java
src/org/mxchange/jsfcore/validator/string/names/NameValidator.java

index 30d45f2cac6088db849ee157458d849740c718d0..5cff97546c5965c935e1407eb4683bd7f89021c2 100644 (file)
@@ -66,12 +66,12 @@ public abstract class BaseObjectValidator extends BaseFrameworkSystem implements
         * @param context FacesContext instance\r
         * @param component UIComponent instance\r
         * @param value Value to check\r
-        * @param fields Array of valid field names (ending with)\r
+        * @param requiredFields Array of required field names (ending with)\r
         * @throws ValidatorException If something more horrible went wrong\r
         */\r
-       protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] fields) throws ValidatorException {\r
+       protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields) throws ValidatorException {\r
                // Trace message\r
-               this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(fields)));\r
+               this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields)));\r
 \r
                // Set resource bundle\r
                this.initResourceBundle(context);\r
@@ -86,7 +86,7 @@ public abstract class BaseObjectValidator extends BaseFrameworkSystem implements
                // Default is no field is valid\r
                boolean isValidField = false;\r
 \r
-               for (final String field : fields) {\r
+               for (final String field : requiredFields) {\r
                        // Get logger\r
                        this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId));\r
 \r
index b6ac926276141dd6fb492249d0c924424a9b01b2..6434cb986728b187fbec907bfd92aae06516a7ed 100644 (file)
@@ -38,16 +38,16 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
         * @param context FacesContext instance\r
         * @param component UIComponent instance\r
         * @param value Value to check\r
-        * @param fields Array of valid field names (ending with)\r
+        * @param requiredFields Array of required field names (ending with)\r
         * @throws ValidatorException If something more horrible went wrong\r
         */\r
        @Override\r
-       protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] fields) throws ValidatorException {\r
+       protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields) throws ValidatorException {\r
                // Trace message\r
-               this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(fields)));\r
+               this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields)));\r
 \r
                // Pre-validate (e.g. on null)\r
-               super.preValidate(context, component, value, fields);\r
+               super.preValidate(context, component, value, requiredFields);\r
 \r
                // Get client id and init message + key\r
                String clientId = component.getClientId();\r
@@ -55,7 +55,7 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
                String errKey;\r
 \r
                // So far all fine!\r
-               for (final String field : fields) {\r
+               for (final String field : requiredFields) {\r
                        // Debug message\r
                        this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId));\r
 \r
index 4b725efc02f4399c235d288665eba1fbd57cf412..45b4cf7919c1acc96fe81da44561c93dd116f71a 100644 (file)
@@ -34,11 +34,11 @@ public class NameValidator extends BaseStringValidator implements Validator {
                // Trace message\r
                this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2} - CALLED!", context, component, value));\r
 \r
-               // All accepted fields\r
-               String[] fields = {"firstName", "familyName"};\r
+               // All accepted, required fields\r
+               String[] requiredFileds = {"firstName", "familyName"};\r
 \r
                // Pre-validation (e.g. not null, not a string, empty string ...)\r
-               super.preValidate(context, component, value, fields);\r
+               super.preValidate(context, component, value, requiredFileds);\r
 \r
                // Trace message\r
                this.getLogger().trace("EXIT!");\r