Class UserDataMap

java.lang.Object
ca.uhn.fhir.rest.api.server.UserDataMap
All Implemented Interfaces:
Map<Object,Object>

public class UserDataMap extends Object implements Map<Object,Object>
RequestDetails.getUserData() used a HashMap previously but that is not thread-safe. It's not possible to simply replace HashMap with ConcurrentHashMap in RequestDetails since null values work differently. This class is a thin wrapper around ConcurrentHashMap that preserves the expected null value behaviour on get. Note that contains() and size() do behave differently. See UserDataMapTest for details. We could use Collections.synchronizedMap to achieve the required thread-safety, but ConcurrentHashMap has better performance characteristics.