dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20482
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9358: minor fixes..
------------------------------------------------------------
revno: 9358
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-12-18 18:50:57 +0100
message:
minor fixes..
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/comparator/OrganisationUnitLevelComparator.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.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/comparator/OrganisationUnitLevelComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/comparator/OrganisationUnitLevelComparator.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/comparator/OrganisationUnitLevelComparator.java 2012-12-18 17:50:57 +0000
@@ -27,8 +27,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
+
import java.util.Comparator;
-import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
/**
* @author Lars Helge Overland
@@ -37,6 +38,8 @@
public class OrganisationUnitLevelComparator
implements Comparator<OrganisationUnitLevel>
{
+ public static final Comparator<OrganisationUnitLevel> INSTANCE = new OrganisationUnitLevelComparator();
+
public int compare( OrganisationUnitLevel level1, OrganisationUnitLevel level2 )
{
return level1.getLevel() - level2.getLevel();
=== 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 2012-12-13 10:47:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java 2012-12-18 17:50:57 +0000
@@ -671,7 +671,7 @@
List<OrganisationUnitLevel> organisationUnitLevels = new ArrayList<OrganisationUnitLevel>(
organisationUnitLevelStore.getAll() );
- Collections.sort( organisationUnitLevels, new OrganisationUnitLevelComparator() );
+ Collections.sort( organisationUnitLevels, OrganisationUnitLevelComparator.INSTANCE );
return organisationUnitLevels;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java 2012-10-03 18:12:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java 2012-12-18 17:50:57 +0000
@@ -191,7 +191,7 @@
organisationUnitLevels = organisationUnitService.getOrganisationUnitLevels();
- Collections.sort( organisationUnitLevels, new OrganisationUnitLevelComparator() );
+ Collections.sort( organisationUnitLevels, OrganisationUnitLevelComparator.INSTANCE );
return SUCCESS;
}