Skip to content

Commit

Permalink
Fix by adding concurrency in DataAdapterRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauriichan committed Dec 22, 2020
1 parent 5d830e6 commit 30853b6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.syntaxphoenix.syntaxapi.data;

import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;

import com.syntaxphoenix.syntaxapi.utils.java.Primitives;

public abstract class DataAdapterRegistry<B> {

private final HashMap<Class<?>, DataAdapter<?, B, B>> adapters = new HashMap<>();
private final ConcurrentHashMap<Class<?>, DataAdapter<?, B, B>> adapters = new ConcurrentHashMap<>();

protected abstract <I, R extends B> DataAdapter<I, R, B> buildAdapter(Class<?> clazz);

Expand Down

0 comments on commit 30853b6

Please sign in to comment.