← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15570: minor fix

 

------------------------------------------------------------
revno: 15570
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-06-06 12:19:36 +0200
message:
  minor fix
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.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	2014-06-06 09:06:24 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java	2014-06-06 10:19:36 +0000
@@ -509,6 +509,11 @@
      */
     public static Date parseDate( final String dateString )
     {
+        if ( dateString == null )
+        {
+            return null;
+        }
+
         SimpleDateFormat[] supportedDateFormats = new SimpleDateFormat[]{
             new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" ),
             new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss" ),
@@ -529,6 +534,7 @@
             {
             }
         }
+
         return null;
     }
 }