From c7392301d0c6afde429d7c6e66d3175f36ab5360 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 15 May 2015 23:05:27 +0300 Subject: Output parameters in alphabetic order to be deterministic (#17857) Change-Id: I8fdb5404cca6e28080f8c4315bb1daa136313744 --- server/src/com/vaadin/ui/Flash.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server/src/com/vaadin/ui/Flash.java') diff --git a/server/src/com/vaadin/ui/Flash.java b/server/src/com/vaadin/ui/Flash.java index 2d0f188b84..6e99d2fe35 100644 --- a/server/src/com/vaadin/ui/Flash.java +++ b/server/src/com/vaadin/ui/Flash.java @@ -15,6 +15,7 @@ */ package com.vaadin.ui; +import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -236,7 +237,15 @@ public class Flash extends AbstractEmbedded { @Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); + + // Parameters, in alphabetic order + ArrayList paramNames = new ArrayList(); for (String param : getParameterNames()) { + paramNames.add(param); + } + + Collections.sort(paramNames); + for (String param : paramNames) { design.appendElement("parameter").attr("name", param) .attr("value", getParameter(param)); } -- cgit v1.2.3