From e5378df39c5254b9839ee62d17d0845b234fdbc5 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 22 May 2019 23:58:08 +0200 Subject: [PATCH] synchronize around attributes in toContentValues() --- .../java/eu/siacs/conversations/entities/Conversation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index 8b02d8be5..8b359713a 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -576,7 +576,9 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl values.put(CREATED, created); values.put(STATUS, status); values.put(MODE, mode); - values.put(ATTRIBUTES, attributes.toString()); + synchronized (this.attributes) { + values.put(ATTRIBUTES, attributes.toString()); + } return values; }