← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21698: minor fix

 

------------------------------------------------------------
revno: 21698
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-01-12 14:09:01 +0700
message:
  minor fix
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.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-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.java	2016-01-12 07:09:01 +0000
@@ -157,10 +157,9 @@
             fieldMap = fieldParser.parse( fields );
         }
 
-        for ( Object object : objects )
-        {
-            collectionNode.addChild( buildNode( fieldMap, klass, object ) );
-        }
+
+        final FieldMap finalFieldMap = fieldMap;
+        objects.stream().forEach( object -> collectionNode.addChild( buildNode( finalFieldMap, klass, object ) ) );
 
         return collectionNode;
     }