← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10582: Upgraded use of deprecated methods in commons validator

 

------------------------------------------------------------
revno: 10582
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-04-16 14:07:17 +0200
message:
  Upgraded use of deprecated methods in commons validator
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java	2012-07-14 10:40:48 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java	2013-04-16 12:07:17 +0000
@@ -35,7 +35,7 @@
 import java.util.Date;
 import java.util.List;
 
-import org.apache.commons.validator.DateValidator;
+import org.apache.commons.validator.routines.DateValidator;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.period.Period;
@@ -368,7 +368,7 @@
      */
     public static boolean dateIsValid( String dateString )
     {
-        return DateValidator.getInstance().isValid( dateString, DEFAULT_DATE_FORMAT, true );
+        return DateValidator.getInstance().isValid( dateString, DEFAULT_DATE_FORMAT );
     }
     
     /**

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java	2012-10-22 18:02:46 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java	2013-04-16 12:07:17 +0000
@@ -31,9 +31,9 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.commons.validator.DateValidator;
-import org.apache.commons.validator.EmailValidator;
-import org.apache.commons.validator.UrlValidator;
+import org.apache.commons.validator.routines.DateValidator;
+import org.apache.commons.validator.routines.EmailValidator;
+import org.apache.commons.validator.routines.UrlValidator;
 
 /**
  * @author Lars Helge Overland