changeset 4903:5ab87837622f

Sort the locations array in new datacage templating language functions.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 29 Jan 2013 17:42:04 +0100
parents e1566938d04c
children aa67a88314f2 68391fbb1c56
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java	Tue Jan 29 17:11:26 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java	Tue Jan 29 17:42:04 2013 +0100
@@ -1,5 +1,6 @@
 package de.intevation.flys.artifacts.datacage.templating;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.Collection;
 import java.util.Map;
@@ -103,6 +104,7 @@
                     else {
                         String loc = ((String)locations).replace(" ", "");
                         String[] split = loc.split(",");
+                        Arrays.sort(split);
                         return split[0];
                     }
                 }
@@ -146,6 +148,7 @@
                     else {
                         String loc = ((String)locations).replace(" ", "");
                         String[] split = loc.split(",");
+                        Arrays.sort(split);
                         return split[split.length - 1];
                     }
                 }

http://dive4elements.wald.intevation.org