← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21247: dont use parallelStream() for update dataSets in OrgUnit (causes issues with certain org unit upd...

 

------------------------------------------------------------
revno: 21247
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-12-01 17:00:42 +0700
message:
  dont use parallelStream() for update dataSets in OrgUnit (causes issues with certain org unit updates)
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.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-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-11-21 15:52:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-12-01 10:00:42 +0000
@@ -258,8 +258,8 @@
         Set<DataSet> toRemove = Sets.difference( dataSets, updates );
         Set<DataSet> toAdd = Sets.difference( updates, dataSets );
 
-        toRemove.parallelStream().forEach( d -> d.getSources().remove( this ) );
-        toAdd.parallelStream().forEach( d -> d.getSources().add( this ) );
+        toRemove.stream().forEach( d -> d.getSources().remove( this ) );
+        toAdd.stream().forEach( d -> d.getSources().add( this ) );
 
         dataSets.clear();
         dataSets.addAll( updates );