diff --git a/build.gradle b/build.gradle index 6576990..f73e5dc 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ subprojects { group = 'org.cadixdev' archivesBaseName = project.name.toLowerCase() - version = '0.5.1' + version = '0.5.2' repositories { mavenCentral() diff --git a/changelogs/0.5.2.md b/changelogs/0.5.2.md new file mode 100644 index 0000000..c3faac7 --- /dev/null +++ b/changelogs/0.5.2.md @@ -0,0 +1,5 @@ +Lorenz 0.5.2 +============ + +Lorenz 0.5.2 addresses issues with using Lorenz's ASM Remapper on Atlas >= 0.2.0. +Specifically, it should now be possibly to concurrently access mappings. diff --git a/lorenz/src/main/java/org/cadixdev/lorenz/MappingSet.java b/lorenz/src/main/java/org/cadixdev/lorenz/MappingSet.java index 947d8f8..6f1bd81 100644 --- a/lorenz/src/main/java/org/cadixdev/lorenz/MappingSet.java +++ b/lorenz/src/main/java/org/cadixdev/lorenz/MappingSet.java @@ -25,16 +25,16 @@ package org.cadixdev.lorenz; -import org.cadixdev.lorenz.impl.MappingSetImpl; -import org.cadixdev.lorenz.model.ClassMapping; -import org.cadixdev.lorenz.model.TopLevelClassMapping; -import org.cadixdev.lorenz.model.jar.CascadingFieldTypeProvider; -import org.cadixdev.lorenz.model.jar.FieldTypeProvider; import org.cadixdev.bombe.type.ArrayType; import org.cadixdev.bombe.type.FieldType; import org.cadixdev.bombe.type.MethodDescriptor; import org.cadixdev.bombe.type.ObjectType; import org.cadixdev.bombe.type.Type; +import org.cadixdev.lorenz.impl.MappingSetImpl; +import org.cadixdev.lorenz.model.ClassMapping; +import org.cadixdev.lorenz.model.TopLevelClassMapping; +import org.cadixdev.lorenz.model.jar.CascadingFieldTypeProvider; +import org.cadixdev.lorenz.model.jar.FieldTypeProvider; import org.cadixdev.lorenz.util.Reversible; import java.util.Collection; diff --git a/lorenz/src/main/java/org/cadixdev/lorenz/impl/MappingSetImpl.java b/lorenz/src/main/java/org/cadixdev/lorenz/impl/MappingSetImpl.java index a054539..8004be0 100644 --- a/lorenz/src/main/java/org/cadixdev/lorenz/impl/MappingSetImpl.java +++ b/lorenz/src/main/java/org/cadixdev/lorenz/impl/MappingSetImpl.java @@ -32,9 +32,9 @@ import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.Map; import java.util.Optional; +import java.util.concurrent.ConcurrentHashMap; /** * A basic implementation of {@link MappingSet}. @@ -44,7 +44,7 @@ */ public class MappingSetImpl implements MappingSet { - private final Map topLevelClasses = new HashMap<>(); + private final Map topLevelClasses = new ConcurrentHashMap<>(); private final MappingSetModelFactory modelFactory; private CascadingFieldTypeProvider fieldTypeProvider = new CascadingFieldTypeProvider(); diff --git a/lorenz/src/main/java/org/cadixdev/lorenz/impl/model/AbstractClassMappingImpl.java b/lorenz/src/main/java/org/cadixdev/lorenz/impl/model/AbstractClassMappingImpl.java index 81906ef..4c4c13f 100644 --- a/lorenz/src/main/java/org/cadixdev/lorenz/impl/model/AbstractClassMappingImpl.java +++ b/lorenz/src/main/java/org/cadixdev/lorenz/impl/model/AbstractClassMappingImpl.java @@ -25,22 +25,22 @@ package org.cadixdev.lorenz.impl.model; +import org.cadixdev.bombe.analysis.InheritanceProvider; +import org.cadixdev.bombe.type.signature.FieldSignature; +import org.cadixdev.bombe.type.signature.MethodSignature; import org.cadixdev.lorenz.MappingSet; import org.cadixdev.lorenz.model.ClassMapping; import org.cadixdev.lorenz.model.FieldMapping; import org.cadixdev.lorenz.model.InnerClassMapping; import org.cadixdev.lorenz.model.MethodMapping; -import org.cadixdev.bombe.analysis.InheritanceProvider; -import org.cadixdev.bombe.type.signature.FieldSignature; -import org.cadixdev.bombe.type.signature.MethodSignature; import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.StringJoiner; +import java.util.concurrent.ConcurrentHashMap; /** * A basic implementation of {@link ClassMapping}. @@ -55,10 +55,10 @@ public abstract class AbstractClassMappingImpl extends AbstractMappingImpl implements ClassMapping { - private final Map fields = new HashMap<>(); - private final Map fieldsByName = new HashMap<>(); - private final Map methods = new HashMap<>(); - private final Map innerClasses = new HashMap<>(); + private final Map fields = new ConcurrentHashMap<>(); + private final Map fieldsByName = new ConcurrentHashMap<>(); + private final Map methods = new ConcurrentHashMap<>(); + private final Map innerClasses = new ConcurrentHashMap<>(); private boolean complete; /**