dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27149
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13469: minor NPE check
------------------------------------------------------------
revno: 13469
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-12-29 22:15:16 +0100
message:
minor NPE check
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2013-12-29 21:13:19 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2013-12-29 21:15:16 +0000
@@ -554,6 +554,7 @@
if ( programStageInstance.getProgramStage().getCaptureCoordinates() )
{
Coordinate coordinate = null;
+
if ( programStageInstance.getLongitude() != null && programStageInstance.getLongitude() != null )
{
coordinate = new Coordinate( programStageInstance.getLongitude(), programStageInstance.getLatitude() );
@@ -572,7 +573,7 @@
}
}
- if ( coordinate.isValid() )
+ if ( coordinate != null && coordinate.isValid() )
{
event.setCoordinate( coordinate );
}