Skip to content

Commit

Permalink
Change propertiesToTrack to be volatile for better behavior when sett…
Browse files Browse the repository at this point in the history
…ing it on the fly
  • Loading branch information
akang31 committed Feb 29, 2024
1 parent afde6d9 commit ad3f1b2
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand All @@ -31,7 +30,7 @@ public class AccessMonitorUtil implements AutoCloseable {
// Map from stack trace to how many times that stack trace appeared
private final ConcurrentHashMap<String, Integer> stackTrace;
// Property keys that we will keep the stack traces for
private Set<String> propertiesToTrack;
private volatile Set<String> propertiesToTrack;
// Map from property key to stack traces map for tracked properties
private final ConcurrentHashMap<String, Set<String>> trackedPropertyStackTraces;

Expand Down

0 comments on commit ad3f1b2

Please sign in to comment.