Skip to content

Commit bee0310

Browse files
authored
Bug fixes: add synchronized block to map operation in OfflineStore (#659)
1 parent a314c5d commit bee0310

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Parse/src/main/java/com/parse/OfflineStore.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,9 @@ public Integer then(Task<List<T>> task) throws Exception {
14621462
*/
14631463
if (object instanceof ParseInstallation
14641464
&& newObjectId == null) {
1465-
classNameAndObjectIdToObjectMap.remove(Pair.create(object.getClassName(), oldObjectId));
1465+
synchronized (lock) {
1466+
classNameAndObjectIdToObjectMap.remove(Pair.create(object.getClassName(), oldObjectId));
1467+
}
14661468
return;
14671469
} else {
14681470
throw new RuntimeException("objectIds cannot be changed in offline mode.");

0 commit comments

Comments
 (0)