Skip to content

Commit

Permalink
fix null values during reload for Consul
Browse files Browse the repository at this point in the history
  • Loading branch information
norbertpotocki committed Oct 1, 2015
1 parent 581b9f5 commit d64531c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void init() {

@Override
public void reload() {
consulValues = new HashMap<>();
Map<String, String> newConsulValues = new HashMap<>();
List<Value> valueList;

try {
Expand All @@ -120,9 +120,10 @@ public void reload() {

LOG.trace("Consul provided configuration key: " + value.getKey() + " with value: " + val);

consulValues.put(value.getKey(), val);
newConsulValues.put(value.getKey(), val);
}

consulValues = newConsulValues;
}

@Override
Expand Down

0 comments on commit d64531c

Please sign in to comment.