Repository: incubator-ranger Updated Branches: refs/heads/master fa7645f2d -> aac45d633
RANGER-435 Policy validation should preserve the order of resources as specified by the user. Signed-off-by: Madhan Neethiraj <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/aac45d63 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/aac45d63 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/aac45d63 Branch: refs/heads/master Commit: aac45d633b2d8589446d23326918b6109065dbff Parents: fa7645f Author: Alok Lal <[email protected]> Authored: Mon Apr 27 20:52:22 2015 -0700 Committer: Madhan Neethiraj <[email protected]> Committed: Mon Apr 27 20:54:53 2015 -0700 ---------------------------------------------------------------------- .../plugin/model/validation/RangerPolicyResourceSignature.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/aac45d63/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java ---------------------------------------------------------------------- diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java b/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java index e95d1e3..9b21dc9 100644 --- a/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java +++ b/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java @@ -19,6 +19,7 @@ package org.apache.ranger.plugin.model.validation; +import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; @@ -137,7 +138,7 @@ public class RangerPolicyResourceSignature { if (_policyResource != null) { builder.append("values="); if (_policyResource.getValues() != null) { - List<String> values = _policyResource.getValues(); + List<String> values = new ArrayList<String>(_policyResource.getValues()); Collections.sort(values); builder.append(values); }
