← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21574: Replaced parallelStream with stream

 

------------------------------------------------------------
revno: 21574
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-01-04 15:26:24 +0100
message:
  Replaced parallelStream with stream
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.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/dataset/DataSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java	2016-01-04 14:26:24 +0000
@@ -271,8 +271,8 @@
         Set<OrganisationUnit> toRemove = Sets.difference( sources, updates );
         Set<OrganisationUnit> toAdd = Sets.difference( updates, sources );
 
-        toRemove.parallelStream().forEach( u -> u.getDataSets().remove( this ) );
-        toAdd.parallelStream().forEach( u -> u.getDataSets().add( this ) );
+        toRemove.stream().forEach( u -> u.getDataSets().remove( this ) );
+        toAdd.stream().forEach( u -> u.getDataSets().add( this ) );
 
         sources.clear();
         sources.addAll( updates );
@@ -295,8 +295,8 @@
         Set<DataElement> toRemove = Sets.difference( dataElements, updates );
         Set<DataElement> toAdd = Sets.difference( updates, dataElements );
 
-        toRemove.parallelStream().forEach( d -> d.getDataSets().remove( this ) );
-        toAdd.parallelStream().forEach( d -> d.getDataSets().add( this ) );
+        toRemove.stream().forEach( d -> d.getDataSets().remove( this ) );
+        toAdd.stream().forEach( d -> d.getDataSets().add( this ) );
 
         dataElements.clear();
         dataElements.addAll( updates );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2016-01-04 10:49:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2016-01-04 14:26:24 +0000
@@ -180,8 +180,8 @@
         Set<OrganisationUnit> toRemove = Sets.difference( organisationUnits, updates );
         Set<OrganisationUnit> toAdd = Sets.difference( updates, organisationUnits );
 
-        toRemove.parallelStream().forEach( u -> u.getPrograms().remove( this ) );
-        toAdd.parallelStream().forEach( u -> u.getPrograms().add( this ) );
+        toRemove.stream().forEach( u -> u.getPrograms().remove( this ) );
+        toAdd.stream().forEach( u -> u.getPrograms().add( this ) );
 
         organisationUnits.clear();
         organisationUnits.addAll( updates );