dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19338
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8390: Made OrganisationUnitHierarchy return immutable sets
------------------------------------------------------------
revno: 8390
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-10-05 11:57:58 +0200
message:
Made OrganisationUnitHierarchy return immutable sets
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitHierarchy.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/OrganisationUnitHierarchy.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitHierarchy.java 2012-04-25 08:51:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitHierarchy.java 2012-10-05 09:57:58 +0000
@@ -151,7 +151,7 @@
if ( preparedChildren != null )
{
- return preparedChildren;
+ return new HashSet<Integer>( preparedChildren );
}
List<Integer> children = new ArrayList<Integer>();
@@ -204,7 +204,7 @@
if ( children != null )
{
- return children;
+ return new HashSet<Integer>( children );
}
children = getChildren( parentId );