From 3bf07dba8b92fc78429de144b7fe31a1fa2d3e63 Mon Sep 17 00:00:00 2001 From: buczekp <buczekp> Date: Thu, 8 Jul 2010 12:06:47 +0000 Subject: [PATCH] [LMS-1625] changed roleWithHierarchy to use LinkedHashSet for deterministic order SVN: 16938 --- .../openbis/generic/shared/basic/dto/RoleWithHierarchy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/RoleWithHierarchy.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/RoleWithHierarchy.java index ccb30ebc980..f4a7d235222 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/RoleWithHierarchy.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/RoleWithHierarchy.java @@ -16,7 +16,7 @@ package ch.systemsx.cisd.openbis.generic.shared.basic.dto; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; import com.google.gwt.user.client.rpc.IsSerializable; @@ -92,7 +92,7 @@ public enum RoleWithHierarchy implements IsSerializable private final RoleLevel roleLevel; - private final Set<RoleWithHierarchy> strongerRoles = new HashSet<RoleWithHierarchy>(); + private final Set<RoleWithHierarchy> strongerRoles = new LinkedHashSet<RoleWithHierarchy>(); private RoleWithHierarchy(RoleWithHierarchy... strongerRoles) { @@ -139,7 +139,7 @@ public enum RoleWithHierarchy implements IsSerializable public Set<RoleWithHierarchy> getRoles() { - HashSet<RoleWithHierarchy> roles = new HashSet<RoleWithHierarchy>(strongerRoles); + Set<RoleWithHierarchy> roles = new LinkedHashSet<RoleWithHierarchy>(strongerRoles); roles.add(this); return roles; } -- GitLab