Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3D4A217BAD for ; Tue, 13 Jan 2015 20:07:56 +0000 (UTC) Received: (qmail 43952 invoked by uid 500); 13 Jan 2015 20:07:50 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 43259 invoked by uid 500); 13 Jan 2015 20:07:49 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 42079 invoked by uid 99); 13 Jan 2015 20:07:49 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2015 20:07:49 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id B02D6AC09E9 for ; Tue, 13 Jan 2015 20:07:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r936080 [14/44] - in /websites/production/commons/content/proper/commons-validator: ./ apidocs/ apidocs/org/apache/commons/validator/ apidocs/org/apache/commons/validator/class-use/ apidocs/org/apache/commons/validator/routines/ apidocs/org... Date: Tue, 13 Jan 2015 20:07:39 -0000 To: commits@commons.apache.org From: britter@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150113200748.B02D6AC09E9@hades.apache.org> Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorAction.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorAction.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorAction.html Tue Jan 13 20:07:34 2015 @@ -104,7 +104,7 @@  43  
  *
 44   -
  * @version $Revision: 1227719 $ $Date: 2012-01-05 18:45:51 +0100 (Do, 05 Jan 2012) $
+
  * @version $Revision: 1649191 $
 45  
  */
 46  384
 public class ValidatorAction implements Serializable {
@@ -304,7 +304,7 @@
      * isDependency().
 151  
      */
-  152  384
     private List dependencyList = Collections.synchronizedList(new ArrayList());
+  152  384
     private final List dependencyList = Collections.synchronizedList(new ArrayList());
 153  
 
 154   @@ -315,7 +315,7 @@
      * parameters defined in the methodParams String.
 157  
      */
-  158  384
     private List methodParameterList = new ArrayList();
+  158  384
     private final List methodParameterList = new ArrayList();
 159  
 
 160   @@ -1312,79 +1312,77 @@  753  173
             Boolean valid = (Boolean) result;
 754  173
             return valid.booleanValue();
 755   -
         } else {
-  756  27
             return (result != null);
-  757  
         }
-  758   +  756  27
         return result != null;
+  757  
     }
-  759   +  758  
 
-  760   +  759  
     /**
-  761   +  760  
      * Returns the ClassLoader set in the Validator contained in the parameter
-  762   +  761  
      * Map.
-  763   +  762  
      */
-  764   +  763  
     private ClassLoader getClassLoader(Map params) {
-  765  131
         Validator v = (Validator) params.get(Validator.VALIDATOR_PARAM);
-  766  131
         return v.getClassLoader();
-  767   +  764  131
         Validator v = (Validator) params.get(Validator.VALIDATOR_PARAM);
+  765  131
         return v.getClassLoader();
+  766  
     }
-  768   +  767  
 
-  769   +  768  
     /**
-  770   +  769  
      * Returns the onlyReturnErrors setting in the Validator contained in the
-  771   +  770  
      * parameter Map.
-  772   +  771  
      */
-  773   +  772  
     private boolean onlyReturnErrors(Map params) {
-  774  106
         Validator v = (Validator) params.get(Validator.VALIDATOR_PARAM);
-  775  106
         return v.getOnlyReturnErrors();
-  776   +  773  106
         Validator v = (Validator) params.get(Validator.VALIDATOR_PARAM);
+  774  106
         return v.getOnlyReturnErrors();
+  775  
     }
-  777   +  776  
 
-  778   +  777  
     /**
-  779   +  778  
      * Accessor method for Log instance.
-  780   +  779  
      *
-  781   +  780  
      * The Log instance variable is transient and
-  782   +  781  
      * accessing it through this method ensures it
-  783   +  782  
      * is re-initialized when this instance is
-  784   +  783  
      * de-serialized.
-  785   +  784  
      *
-  786   +  785  
      * @return The Log instance.
-  787   +  786  
      */
-  788   +  787  
     private Log getLog() {
-  789  1339
         if (log == null) {
-  790  0
             log =  LogFactory.getLog(ValidatorAction.class);
-  791   +  788  1339
         if (log == null) {
+  789  0
             log =  LogFactory.getLog(ValidatorAction.class);
+  790  
         }
-  792  1339
         return log;
-  793   +  791  1339
         return log;
+  792  
     }
-  794   +  793  
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorException.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorException.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorException.html Tue Jan 13 20:07:34 2015 @@ -64,7 +64,7 @@  23  
  *
 24   -
  * @version $Revision: 1227719 $ $Date: 2012-01-05 18:45:51 +0100 (Do, 05 Jan 2012) $
+
  * @version $Revision: 1649191 $
 25  
  */
 26   @@ -107,6 +107,6 @@
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResources.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResources.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResources.html Tue Jan 13 20:07:34 2015 @@ -12,7 +12,7 @@
 
- +
Classes in this File Line Coverage Branch Coverage Complexity
ValidatorResources
87%
144/164
76%
75/98
2,852
ValidatorResources
87%
144/164
75%
78/104
2,852
ValidatorResources$1
8%
1/12
0%
0/2
2,852
@@ -123,7 +123,7 @@  52  
  *
 53   -
  * @version $Revision: 1647900 $ $Date: 2014-12-25 16:03:53 +0100 (Do, 25 Dez 2014) $
+
  * @version $Revision: 1649191 $
 54  
  */
 55  0
 public class ValidatorResources implements Serializable {
@@ -182,7 +182,7 @@
     };
 83  
 
-  84  113
     private transient Log log = LogFactory.getLog(ValidatorResources.class);
+  84  113
     private transient Log log = LogFactory.getLog(ValidatorResources.class);
 85  
 
 86   @@ -1151,6 +1151,6 @@
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResult.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResult.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResult.html Tue Jan 13 20:07:34 2015 @@ -75,7 +75,7 @@  28  
  *
 29   -
  * @version $Revision: 1647900 $ $Date: 2014-12-25 16:03:53 +0100 (Do, 25 Dez 2014) $
+
  * @version $Revision: 1649191 $
 30  
  */
 31   @@ -393,6 +393,6 @@
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResults.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResults.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.ValidatorResults.html Tue Jan 13 20:07:34 2015 @@ -76,7 +76,7 @@  29  
  *
 30   -
  * @version $Revision: 1227719 $ $Date: 2012-01-05 18:45:51 +0100 (Do, 05 Jan 2012) $
+
  * @version $Revision: 1649191 $
 31  
  */
 32  505
 public class ValidatorResults implements Serializable {
@@ -292,6 +292,6 @@
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.Var.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.Var.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.Var.html Tue Jan 13 20:07:34 2015 @@ -68,7 +68,7 @@  25  
  *
 26   -
  * @version $Revision: 1640272 $ $Date: 2014-11-18 03:34:13 +0100 (Di, 18 Nov 2014) $
+
  * @version $Revision: 1649191 $
 27  
  */
 28   @@ -407,6 +407,6 @@
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractCalendarValidator.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractCalendarValidator.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractCalendarValidator.html Tue Jan 13 20:07:34 2015 @@ -82,7 +82,7 @@  32  
  *
 33   -
  * @version $Revision: 1227719 $ $Date: 2012-01-05 18:45:51 +0100 (Do, 05 Jan 2012) $
+
  * @version $Revision: 1649191 $
 34  
  * @since Validator 1.3.0
 35   @@ -760,6 +760,6 @@
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractFormatValidator.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractFormatValidator.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractFormatValidator.html Tue Jan 13 20:07:34 2015 @@ -76,7 +76,7 @@  29  
  *
 30   -
  * @version $Revision: 1227719 $ $Date: 2012-01-05 18:45:51 +0100 (Do, 05 Jan 2012) $
+
  * @version $Revision: 1649191 $
 31  
  * @since Validator 1.3.0
 32   @@ -439,6 +439,6 @@
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractNumberValidator.html ============================================================================== --- websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractNumberValidator.html (original) +++ websites/production/commons/content/proper/commons-validator/cobertura/org.apache.commons.validator.routines.AbstractNumberValidator.html Tue Jan 13 20:07:34 2015 @@ -78,7 +78,7 @@  30  
  *
 31   -
  * @version $Revision: 1227719 $ $Date: 2012-01-05 18:45:51 +0100 (Do, 05 Jan 2012) $
+
  * @version $Revision: 1649191 $
 32  
  * @since Validator 1.3.0
 33   @@ -257,251 +257,247 @@  124  64
         if (isAllowFractions()) {
 125  24
             return (value.doubleValue() >= min.doubleValue());
 126   -
         } else {
-  127  40
             return (value.longValue() >= min.longValue());
-  128  
         }
-  129   +  127  40
         return (value.longValue() >= min.longValue());
+  128  
     }
-  130   +  129  
 
-  131   +  130  
     /**
-  132   +  131  
      * Check if the value is less than or equal to a maximum.
-  133   +  132  
      *
-  134   +  133  
      * @param value The value validation is being performed on.
-  135   +  134  
      * @param max The maximum value.
-  136   +  135  
      * @return <code>true</code> if the value is less than
-  137   +  136  
      *         or equal to the maximum.
-  138   +  137  
      */
-  139   +  138  
     public boolean maxValue(Number value, Number max) {
-  140  56
         if (isAllowFractions()) {
-  141  21
             return (value.doubleValue() <= max.doubleValue());
-  142   -
         } else {
-  143  35
             return (value.longValue() <= max.longValue());
-  144   +  139  56
         if (isAllowFractions()) {
+  140  21
             return (value.doubleValue() <= max.doubleValue());
+  141  
         }
-  145   +  142  35
         return (value.longValue() <= max.longValue());
+  143  
     }
-  146   +  144  
 
-  147   +  145  
     /**
-  148   +  146  
      * <p>Parse the value using the specified pattern.</p>
-  149   +  147  
      *
-  150   +  148  
      * @param value The value validation is being performed on.
-  151   +  149  
      * @param pattern The pattern used to validate the value against, or the
-  152   +  150  
      *        default for the <code>Locale</code> if <code>null</code>.
-  153   +  151  
      * @param locale The locale to use for the date format, system default if null.
-  154   +  152  
      * @return The parsed value if valid or <code>null</code> if invalid.
-  155   +  153  
      */
-  156   +  154  
     protected Object parse(String value, String pattern, Locale locale) {
-  157   +  155  
 
-  158  903
         value = (value == null ? null : value.trim());
-  159  903
         if (value == null || value.length() == 0) {
-  160  136
             return null;
-  161   +  156  903
         value = (value == null ? null : value.trim());
+  157  903
         if (value == null || value.length() == 0) {
+  158  136
             return null;
+  159  
         }
-  162  767
         Format formatter = getFormat(pattern, locale);
-  163  767
         return parse(value, formatter);
-  164   +  160  767
         Format formatter = getFormat(pattern, locale);
+  161  767
         return parse(value, formatter);
+  162  
 
-  165   +  163  
     }
-  166   +  164  
 
-  167   +  165  
     /**
-  168   +  166  
      * <p>Process the parsed value, performing any further validation
-  169   +  167  
      *    and type conversion required.</p>
-  170   +  168  
      *
-  171   +  169  
      * @param value The parsed object created.
-  172   +  170  
      * @param formatter The Format used to parse the value with.
-  173   +  171  
      * @return The parsed value converted to the appropriate type
-  174   +  172  
      *         if valid or <code>null</code> if invalid.
-  175   +  173  
      */
-  176   +  174  
     protected abstract Object processParsedValue(Object value, Format formatter);
-  177   +  175  
 
-  178   +  176  
     /**
-  179   +  177  
      * <p>Returns a <code>NumberFormat</code> for the specified <i>pattern</i>
-  180   +  178  
      *    and/or <code>Locale</code>.</p>
-  181   +  179  
      *
-  182   +  180  
      * @param pattern The pattern used to validate the value against or
-  183   +  181  
      *        <code>null</code> to use the default for the <code>Locale</code>.
-  184   +  182  
      * @param locale The locale to use for the currency format, system default if null.
-  185   +  183  
      * @return The <code>NumberFormat</code> to created.
-  186   +  184  
      */
-  187   +  185  
     protected Format getFormat(String pattern, Locale locale) {
-  188   +  186  
 
-  189  791
         NumberFormat formatter = null;
-  190  791
         boolean usePattern = (pattern != null && pattern.length() > 0);
-  191  791
         if (!usePattern) {
-  192  407
             formatter = (NumberFormat)getFormat(locale);
-  193  384
         } else if (locale == null) {
-  194  347
             formatter =  new DecimalFormat(pattern);
-  195   +  187  791
         NumberFormat formatter = null;
+  188  791
         boolean usePattern = (pattern != null && pattern.length() > 0);
+  189  791
         if (!usePattern) {
+  190  407
             formatter = (NumberFormat)getFormat(locale);
+  191  384
         } else if (locale == null) {
+  192  347
             formatter =  new DecimalFormat(pattern);
+  193  
         } else {
-  196  37
             DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale);
-  197  37
             formatter = new DecimalFormat(pattern, symbols);
-  198   +  194  37
             DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale);
+  195  37
             formatter = new DecimalFormat(pattern, symbols);
+  196  
         }
-  199   +  197  
 
-  200  791
         if (determineScale(formatter) == 0) {
-  201  355
             formatter.setParseIntegerOnly(true);
-  202   +  198  791
         if (determineScale(formatter) == 0) {
+  199  355
             formatter.setParseIntegerOnly(true);
+  200  
         }
-  203  791
         return formatter;
-  204   +  201  791
         return formatter;
+  202  
     }
-  205   +  203  
 
-  206   +  204  
     /**
-  207   +  205  
      * <p>Returns the <i>multiplier</i> of the <code>NumberFormat</code>.</p>
-  208   +  206  
      *
-  209   +  207  
      * @param format The <code>NumberFormat</code> to determine the
-  210   +  208  
      *        multiplier of.
-  211   +  209  
      * @return The multiplying factor for the format..
-  212   +  210  
      */
-  213   +  211  
     protected int determineScale(NumberFormat format) {
-  214  877
         if (!isStrict()) {
-  215  260
             return -1;
-  216   +  212  877
         if (!isStrict()) {
+  213  260
             return -1;
+  214  
         }
-  217  617
         if (!isAllowFractions() || format.isParseIntegerOnly()) {
-  218  323
             return 0;
-  219   +  215  617
         if (!isAllowFractions() || format.isParseIntegerOnly()) {
+  216  323
             return 0;
+  217  
         }
-  220  294
         int minimumFraction = format.getMinimumFractionDigits();
-  221  294
         int maximumFraction = format.getMaximumFractionDigits();
-  222  294
         if (minimumFraction != maximumFraction) {
-  223  175
             return -1;
-  224   +  218  294
         int minimumFraction = format.getMinimumFractionDigits();
+  219  294
         int maximumFraction = format.getMaximumFractionDigits();
+  220  294
         if (minimumFraction != maximumFraction) {
+  221  175
             return -1;
+  222  
         }
-  225  119
         int scale = minimumFraction;
-  226  119
         if (format instanceof DecimalFormat) {
-  227  119
             int multiplier = ((DecimalFormat)format).getMultiplier();
-  228  119
             if (multiplier == 100) {
-  229  20
                 scale += 2;
-  230  99
             } else if (multiplier == 1000) {
-  231  0
                 scale += 3;
-  232   +  223  119
         int scale = minimumFraction;
+  224  119
         if (format instanceof DecimalFormat) {
+  225  119
             int multiplier = ((DecimalFormat)format).getMultiplier();
+  226  119
             if (multiplier == 100) {
+  227  20
                 scale += 2;
+  228  99
             } else if (multiplier == 1000) {
+  229  0
                 scale += 3;
+  230  
             }
-  233  119
         } else if (formatType == PERCENT_FORMAT) {
-  234  0
             scale += 2;
-  235   +  231  119
         } else if (formatType == PERCENT_FORMAT) {
+  232  0
             scale += 2;
+  233  
         }
-  236  119
         return scale;
-  237   +  234  119
         return scale;
+  235  
     }
-  238   +  236  
 
-  239   +  237  
     /**
-  240   +  238  
      * <p>Returns a <code>NumberFormat</code> for the specified Locale.</p>
-  241   +  239  
      *
-  242   +  240  
      * @param locale The locale a <code>NumberFormat</code> is required for,
-  243   +  241  
      *   system default if null.
-  244   +  242  
      * @return The <code>NumberFormat</code> to created.
-  245   +  243  
      */
-  246   +  244  
     protected Format getFormat(Locale locale) {
-  247  407
         NumberFormat formatter = null;
-  248  407
         switch (formatType) {
-  249   +  245  407
         NumberFormat formatter = null;
+  246  407
         switch (formatType) {
+  247  
         case CURRENCY_FORMAT:
-  250  26
             if (locale == null) {
-  251  2
                 formatter = NumberFormat.getCurrencyInstance();
-  252   +  248  26
             if (locale == null) {
+  249  2
                 formatter = NumberFormat.getCurrencyInstance();
+  250  
             } else {
-  253  24
                 formatter = NumberFormat.getCurrencyInstance(locale);
-  254   +  251  24
                 formatter = NumberFormat.getCurrencyInstance(locale);
+  252  
             }
-  255  24
             break;
-  256   +  253  24
             break;
+  254  
         case PERCENT_FORMAT:
-  257  13
             if (locale == null) {
-  258  3
                 formatter = NumberFormat.getPercentInstance();
-  259   +  255  13
             if (locale == null) {
+  256  3
                 formatter = NumberFormat.getPercentInstance();
+  257  
             } else {
-  260  10
                 formatter = NumberFormat.getPercentInstance(locale);
-  261   +  258  10
                 formatter = NumberFormat.getPercentInstance(locale);
+  259  
             }
-  262  10
             break;
-  263   +  260  10
             break;
+  261  
         default:
-  264  368
             if (locale == null) {
-  265  48
                 formatter = NumberFormat.getInstance();
-  266   +  262  368
             if (locale == null) {
+  263  48
                 formatter = NumberFormat.getInstance();
+  264  
             } else {
-  267  320
                 formatter = NumberFormat.getInstance(locale);
-  268   +  265  320
                 formatter = NumberFormat.getInstance(locale);
+  266  
             }
-  269   +  267  
             break;
-  270   +  268  
         }
-  271  407
         return formatter;
-  272   +  269  407
         return formatter;
+  270  
     }
-  273   +  271  
 }
- + \ No newline at end of file