You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2011/02/13 20:43:13 UTC

svn commit: r1070282 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java

Author: jleroux
Date: Sun Feb 13 19:43:13 2011
New Revision: 1070282

URL: http://svn.apache.org/viewvc?rev=1070282&view=rev
Log:
Revert r1070230, was a patch from Stephen Rufle "Blank year in UtilValidate.isYear should return false" (https://issues.apache.org/jira/browse/OFBIZ-4171) - OFBIZ-4171

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java?rev=1070282&r1=1070281&r2=1070282&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java Sun Feb 13 19:43:13 2011
@@ -746,7 +746,7 @@ public class UtilValidate {
      *  to use 4-digit year numbers everywhere.
      */
     public static boolean isYear(String s) {
-        if (isEmpty(s)) return false;
+        if (isEmpty(s)) return defaultEmptyOK;
 
         if (!isNonnegativeInteger(s)) return false;
         return ((s.length() == 2) || (s.length() == 4));
@@ -771,13 +771,13 @@ public class UtilValidate {
 
     /** isMonth returns true if string s is a valid month number between 1 and 12. */
     public static boolean isMonth(String s) {
-        if (isEmpty(s)) return false;
+        if (isEmpty(s)) return defaultEmptyOK;
         return isIntegerInRange(s, 1, 12);
     }
 
     /** isDay returns true if string s is a valid day number between 1 and 31. */
     public static boolean isDay(String s) {
-        if (isEmpty(s)) return false;
+        if (isEmpty(s)) return defaultEmptyOK;
         return isIntegerInRange(s, 1, 31);
     }