Skip to content

Commit

Permalink
fix: prevent possible NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
madoke committed Aug 15, 2016
1 parent 56dad7a commit c688b52
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ private void init() {
}

private void cacheValues(Node configNode) {
if(configNode == null || configNode.getNodes() == null) {
return;
}

for (Node valueNode : configNode.getNodes()) {
final String etcdKey = valueNode.key();
final String sourceKey = Iterables.getLast(keySplitter.split(etcdKey));
Expand Down

0 comments on commit c688b52

Please sign in to comment.