=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/DefaultEventStore.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/DefaultEventStore.java 2013-11-19 10:21:42 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/DefaultEventStore.java 2013-11-19 12:09:47 +0000 @@ -40,6 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.support.rowset.SqlRowSet; +import org.springframework.util.StringUtils; import java.io.IOException; import java.util.ArrayList; @@ -185,22 +186,25 @@ Coordinate coordinate = new Coordinate(); String psi_coordinates = rowSet.getString( "psi_coordinates" ); - try - { - List list = objectMapper.readValue( psi_coordinates, new TypeReference>() - { - } ); - - coordinate.setLongitude( list.get( 0 ) ); - coordinate.setLatitude( list.get( 1 ) ); - } - catch ( IOException ignored ) - { - } - - if ( coordinate.isValid() ) - { - event.setCoordinate( coordinate ); + if ( !StringUtils.isEmpty( psi_coordinates ) ) + { + try + { + List list = objectMapper.readValue( psi_coordinates, new TypeReference>() + { + } ); + + coordinate.setLongitude( list.get( 0 ) ); + coordinate.setLatitude( list.get( 1 ) ); + } + catch ( IOException ignored ) + { + } + + if ( coordinate.isValid() ) + { + event.setCoordinate( coordinate ); + } } }