Skip to content
Open
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 @@ -15,9 +15,9 @@

package software.amazon.awssdk.enhanced.dynamodb.internal.mapper;

import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import software.amazon.awssdk.annotations.SdkInternalApi;

/**
Expand All @@ -27,7 +27,7 @@
@SdkInternalApi
@SuppressWarnings("unchecked")
public class MetaTableSchemaCache {
private final Map<Class<?>, MetaTableSchema<?>> cacheMap = new HashMap<>();
private final Map<Class<?>, MetaTableSchema<?>> cacheMap = new ConcurrentHashMap<>();

public <T> MetaTableSchema<T> getOrCreate(Class<T> mappedClass) {
return (MetaTableSchema<T>) cacheMap().computeIfAbsent(
Expand Down