diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAIInfo.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAIInfo.java index 4788062..8fda7cd 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAIInfo.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAIInfo.java @@ -270,7 +270,9 @@ public class MapWithAIInfo extends && Objects.equals(this.conflationUrl, other.conflationUrl) && Objects.equals(this.conflationParameters, other.conflationParameters) && Objects.equals(this.categories, other.categories) - && Objects.equals(this.alreadyConflatedKey, other.alreadyConflatedKey); + && Objects.equals(this.alreadyConflatedKey, other.alreadyConflatedKey) + && ((this.parameters == null && other.parameters == null) + || Objects.equals(this.parameters, other.parameters)); // CHECKSTYLE.ON: BooleanExpressionComplexity } diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java index 9f0f970..ed2a3ff 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java @@ -444,9 +444,7 @@ public class MapWithAILayerInfo { } public static void addLayers(Collection infos) { - for (MapWithAIInfo i : infos) { - instance.add(i); - } + infos.forEach(instance::add); instance.save(); Collections.sort(instance.layers); }