From afde6d9eadbd6999766ea1857956e019faedf271 Mon Sep 17 00:00:00 2001 From: Yongkoo Kang Date: Wed, 28 Feb 2024 12:54:33 -0800 Subject: [PATCH] Update the merge method as well --- .../archaius/instrumentation/AccessMonitorUtil.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/archaius2-core/src/main/java/com/netflix/archaius/instrumentation/AccessMonitorUtil.java b/archaius2-core/src/main/java/com/netflix/archaius/instrumentation/AccessMonitorUtil.java index e523b18b..1edbc8ff 100644 --- a/archaius2-core/src/main/java/com/netflix/archaius/instrumentation/AccessMonitorUtil.java +++ b/archaius2-core/src/main/java/com/netflix/archaius/instrumentation/AccessMonitorUtil.java @@ -140,6 +140,15 @@ public void merge(AccessMonitorUtil accessMonitorUtil) { for (Map.Entry entry : accessMonitorUtil.stackTrace.entrySet()) { stackTrace.merge(entry.getKey(), entry.getValue(), Integer::sum); } + for (Map.Entry> entry : accessMonitorUtil.trackedPropertyStackTraces.entrySet()) { + trackedPropertyStackTraces.merge( + entry.getKey(), + entry.getValue(), + (oldSet, newSet) -> { + oldSet.addAll(newSet); + return oldSet; + }); + } } public void registerUsage(PropertyDetails propertyDetails) {