Always ignore root node when adding node to dynamic config store

Change-Id: I8cb0021fc9098fb71743f64dfbf0733c794452fc
This commit is contained in:
Jordan Halterman 2018-08-21 10:38:43 -07:00 committed by Andrea Campanella
parent 9379a078dc
commit d4e9417a59

View File

@ -145,7 +145,7 @@ public class DistributedDynamicConfigStore
if (spath == null) {
throw new FailedException("Invalid ResourceId, cannot create Node");
}
if (spath.equals(ResourceIdParser.ROOT) && node == null) {
if (spath.equals(ResourceIdParser.ROOT)) {
return CompletableFuture.completedFuture(true);
} else if (complete(keystore.get(DocumentPath.from(spath))) == null) {
throw new FailedException("Node or parent does not exist for " + spath);