Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class Preferences implements AuditLogger {

@Expose
@SerializedName("audit_log")
private Map<String, Entry> logEntries = Maps.newHashMap();
private Map<String, Entry> logEntries = Maps.newConcurrentMap();

@Expose
@SerializedName("claiming_mode")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void write(@NotNull JsonWriter out, @NotNull Preferences prefs) throws IO
private void writeAuditLog(@NotNull JsonWriter out, @NotNull Map<String, AuditLogger.Entry> auditLog) throws IOException {
out.beginObject();
int i = 0;
for (Map.Entry<String, AuditLogger.Entry> entry : auditLog.entrySet()) {
for (Map.Entry<String, AuditLogger.Entry> entry : Map.copyOf(auditLog).entrySet()) {
if (i >= maxPersistedLogEntries) {
break;
}
Expand Down Expand Up @@ -102,7 +102,7 @@ public Preferences read(@NotNull JsonReader in) throws IOException {

@NotNull
private Map<String, AuditLogger.Entry> readAuditLog(@NotNull JsonReader in) throws IOException {
final Map<String, AuditLogger.Entry> auditLog = Maps.newHashMap();
final Map<String, AuditLogger.Entry> auditLog = Maps.newConcurrentMap();
in.beginObject();
while (in.hasNext()) {
auditLog.put(in.nextName(), readAuditLogEntry(in));
Expand Down
Loading