Skip to content

Commit cef2c13

Browse files
Revert attributes map back to synchronizedMap.
1 parent f236148 commit cef2c13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core-api/src/main/java/com/optimizely/ab/OptimizelyUserContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public OptimizelyUserContext(@Nonnull Optimizely optimizely,
6060
this.optimizely = optimizely;
6161
this.userId = userId;
6262
if (attributes != null) {
63-
this.attributes = new ConcurrentHashMap<>(new HashMap<>(attributes));
63+
this.attributes = Collections.synchronizedMap(new HashMap<>(attributes));
6464
} else {
65-
this.attributes = new ConcurrentHashMap<>(new HashMap<>());
65+
this.attributes = Collections.synchronizedMap(new HashMap<>());
6666
}
6767
this.forcedDecisionsMap = forcedDecisionsMap != null ? forcedDecisionsMap : new ConcurrentHashMap<>();
6868
}

0 commit comments

Comments
 (0)