=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java 2015-10-12 10:12:49 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java 2015-10-15 21:33:41 +0000 @@ -44,7 +44,6 @@ import java.util.Set; import org.apache.commons.lang3.ObjectUtils; -import org.hisp.dhis.common.IdentifiableObjectUtils; import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.commons.filter.FilterUtils; import org.hisp.dhis.configuration.ConfigurationService; @@ -447,7 +446,7 @@ if ( currentUser != null && !currentUser.getUserCredentials().isSuper() ) { - List userDataSets = IdentifiableObjectUtils.getUids( currentUser.getUserCredentials().getAllDataSets() ); + Set userDataSets = Sets.newHashSet( getUids( currentUser.getUserCredentials().getAllDataSets() ) ); for ( Set dataSets : associationMap.values() ) { @@ -473,7 +472,7 @@ List organisationUnitsWithChildren = getOrganisationUnitsWithChildren( parentIds, maxLevels ); - List children = getUids( organisationUnitsWithChildren ); + Set children = Sets.newHashSet( getUids( organisationUnitsWithChildren ) ); associationMap.keySet().retainAll( children ); }