← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19589: minor, reuse a static Joiner for OU.getPath instead of creating one on every call

 

------------------------------------------------------------
revno: 19589
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-07-08 16:40:04 +0700
message:
  minor, reuse a static Joiner for OU.getPath instead of creating one on every call
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-07-07 14:54:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-07-08 09:40:04 +0000
@@ -82,6 +82,8 @@
 {
     private static final long serialVersionUID = 1228298379303894619L;
 
+    private static final Joiner PATH_JOINER = Joiner.on( "/" );
+
     public static final String FEATURETYPE_NONE = "None";
     public static final String FEATURETYPE_MULTIPOLYGON = "MultiPolygon";
     public static final String FEATURETYPE_POLYGON = "Polygon";
@@ -852,7 +854,7 @@
 
         Collections.reverse( pathList );
 
-        path = "/" + Joiner.on( "/" ).join( pathList );
+        path = "/" + PATH_JOINER.join( pathList );
 
         return path;
     }