Skip to content

Commit 9103fb1

Browse files
committed
Update DefaultCompositeConfig to send the correct object when updating listeners
1 parent 2b1095a commit 9103fb1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

archaius2-core/src/main/java/com/netflix/archaius/config/AbstractConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public String getString(String key) {
198198
}
199199

200200
if (value instanceof String) {
201+
// todo: inconsistent with above
201202
return resolve(value.toString());
202203
} else {
203204
return value.toString();

archaius2-core/src/main/java/com/netflix/archaius/config/DefaultCompositeConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public synchronized Collection<String> getConfigNames() {
247247
protected void postConfigAdded(Config child) {
248248
child.setStrInterpolator(getStrInterpolator());
249249
child.setDecoder(getDecoder());
250-
notifyConfigAdded(child);
250+
notifyConfigAdded(this);
251251
child.addListener(listener);
252252
}
253253

@@ -267,7 +267,7 @@ public synchronized Config internalRemoveConfig(String name) {
267267
if (child != null) {
268268
state = state.removeConfig(name);
269269
child.removeListener(listener);
270-
this.notifyConfigRemoved(child);
270+
this.notifyConfigRemoved(this);
271271
}
272272
return child;
273273
}

0 commit comments

Comments
 (0)