Skip to content

Commit a973c18

Browse files
committed
DefaultUsageService: clarify clearStats behavior
1 parent b896555 commit a973c18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/scijava/usage/DefaultUsageService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ public Map<String, UsageStats> getStats() {
6666
@Override
6767
public void clearStats() {
6868
// NB: Rather than calling stats.clear(), we allocate a new object
69-
// so that references to the old table are not modified.
69+
// so that references to the old table are not modified. In this way,
70+
// any code that obtained the old table reference directly by calling
71+
// getStats() can continue working with it unimpeded.
7072
stats = new HashMap<String, UsageStats>();
7173
}
7274

0 commit comments

Comments
 (0)