# HG changeset patch # User Raimund Renkert # Date 1359477724 -3600 # Node ID 5ab87837622fcc36d77c97dda074b5bb92b2d2c8 # Parent e1566938d04cc39b1faef0444d87f2fb24760860 Sort the locations array in new datacage templating language functions. diff -r e1566938d04c -r 5ab87837622f flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java --- 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]; } }