← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13630: Null check

 

------------------------------------------------------------
revno: 13630
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-01-07 19:28:49 +0100
message:
  Null check
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java
  dhis-2/dhis-api/src/test/resources/manifest.webapp


--
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-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java	2014-01-07 08:22:52 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java	2014-01-07 18:28:49 +0000
@@ -297,6 +297,11 @@
 
     public static int getAgeFromDate( Date date )
     {
+        if ( date == null )
+        {
+            return -1;
+        }
+        
         Calendar birthCalendar = Calendar.getInstance();
         birthCalendar.setTime( date );
 

=== modified file 'dhis-2/dhis-api/src/test/resources/manifest.webapp'
--- dhis-2/dhis-api/src/test/resources/manifest.webapp	2013-05-17 11:14:26 +0000
+++ dhis-2/dhis-api/src/test/resources/manifest.webapp	2014-01-07 18:28:49 +0000
@@ -28,9 +28,6 @@
         }
     },
     "default_locale": "en",
-    "permissions": {
-        "systemXHR": {}
-    },
     "activities": {
       "dhis": {
         "href": "http://localhost:8080/dhis";