Skip to content

Commit

Permalink
Use a concurrent hash map in the mixin generator
Browse files Browse the repository at this point in the history
Avoid concurrent modifications
  • Loading branch information
Matyrobbrt committed Jan 20, 2024
1 parent fd81ebe commit d679480
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, GeneratedClass> generatedMixinClasses = new HashMap<>();
private final Map<String, GeneratedClass> generatedMixinClasses = new ConcurrentHashMap<>();

@Nullable
public Map<String, GeneratedClass> getGeneratedMixinClasses() {
Expand Down

0 comments on commit d679480

Please sign in to comment.