From d67948018092fabe5a448903acc8570b40ee7f21 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Sat, 20 Jan 2024 14:45:37 +0200 Subject: [PATCH] Use a concurrent hash map in the mixin generator Avoid concurrent modifications --- .../su5ed/sinytra/adapter/patch/MixinClassGeneratorImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/definition/src/main/java/dev/su5ed/sinytra/adapter/patch/MixinClassGeneratorImpl.java b/definition/src/main/java/dev/su5ed/sinytra/adapter/patch/MixinClassGeneratorImpl.java index d7a5594..f3ece15 100644 --- a/definition/src/main/java/dev/su5ed/sinytra/adapter/patch/MixinClassGeneratorImpl.java +++ b/definition/src/main/java/dev/su5ed/sinytra/adapter/patch/MixinClassGeneratorImpl.java @@ -10,11 +10,11 @@ import org.spongepowered.asm.service.MixinService; import java.io.IOException; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; public class MixinClassGeneratorImpl implements MixinClassGenerator { - private final Map generatedMixinClasses = new HashMap<>(); + private final Map generatedMixinClasses = new ConcurrentHashMap<>(); @Nullable public Map getGeneratedMixinClasses() {