=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java 2015-10-08 14:29:41 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java 2015-11-14 20:03:31 +0000 @@ -32,6 +32,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; @@ -42,6 +43,7 @@ import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; +import com.google.common.collect.Lists; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.commons.logging.Log; @@ -284,6 +286,11 @@ { List orgUnits = idObjectManager.getObjects( OrganisationUnit.class, property, identifiers ); + if ( orgUnits == null ) + { + return Maps.newHashMap(); + } + return IdentifiableObjectUtils.getMap( orgUnits, property ); }