You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ab...@apache.org on 2020/05/19 22:25:46 UTC
[ranger] branch master updated: RANGER-2823:
RangerResouceTrie.copySubTree() does not set up TrieNode's child nodes
correctly
This is an automated email from the ASF dual-hosted git repository.
abhay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new 45efc9a RANGER-2823: RangerResouceTrie.copySubTree() does not set up TrieNode's child nodes correctly
45efc9a is described below
commit 45efc9a622a10d963d1b5d406bd9e49fdb6d6589
Author: Abhay Kulkarni <ab...@apache.org>
AuthorDate: Tue May 19 15:23:50 2020 -0700
RANGER-2823: RangerResouceTrie.copySubTree() does not set up TrieNode's child nodes correctly
---
.../org/apache/ranger/plugin/policyengine/RangerResourceTrie.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceTrie.java b/agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceTrie.java
index e7d913c..95af89d 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceTrie.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceTrie.java
@@ -254,7 +254,9 @@ public class RangerResourceTrie<T extends RangerPolicyResourceEvaluator> {
TRACE_LOG.trace("==> copyTrieSubtree(" + sb + ")");
}
TrieNode<T> dest = new TrieNode<>(source.str);
- dest.setParent(parent);
+ if (parent != null) {
+ parent.addChild(dest);
+ }
synchronized (source.children) {
dest.isSetup = source.isSetup;