From 151036fa72502304a78a6ab69496eb192fe6abf1 Mon Sep 17 00:00:00 2001 From: Christian Kaltepoth Date: Wed, 3 Oct 2018 14:28:54 +0200 Subject: [PATCH] ParamConverterFactory should use LinkedHashSet to preserve ordering (#3670) Signed-off-by: Christian Kaltepoth --- .../jersey/server/internal/inject/ParamConverterFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/inject/ParamConverterFactory.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/inject/ParamConverterFactory.java index ca542316f9..2d8afd0566 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/internal/inject/ParamConverterFactory.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/inject/ParamConverterFactory.java @@ -19,7 +19,7 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.ArrayList; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -49,7 +49,7 @@ public class ParamConverterFactory implements ParamConverterProvider { ParamConverterFactory(Set providers, Set customProviders) { - Set copyProviders = new HashSet<>(providers); + Set copyProviders = new LinkedHashSet<>(providers); converterProviders = new ArrayList<>(); converterProviders.addAll(customProviders); copyProviders.removeAll(customProviders);