Skip to content

Commit

Permalink
Update the merge method as well
Browse files Browse the repository at this point in the history
  • Loading branch information
akang31 committed Feb 28, 2024
1 parent 00abf4a commit afde6d9
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ public void merge(AccessMonitorUtil accessMonitorUtil) {
for (Map.Entry<String, Integer> entry : accessMonitorUtil.stackTrace.entrySet()) {
stackTrace.merge(entry.getKey(), entry.getValue(), Integer::sum);
}
for (Map.Entry<String, Set<String>> entry : accessMonitorUtil.trackedPropertyStackTraces.entrySet()) {
trackedPropertyStackTraces.merge(
entry.getKey(),
entry.getValue(),
(oldSet, newSet) -> {
oldSet.addAll(newSet);
return oldSet;
});
}
}

public void registerUsage(PropertyDetails propertyDetails) {
Expand Down

0 comments on commit afde6d9

Please sign in to comment.