From ec6b09adf3ad53a9a6a0428ef75656b7ebf68835 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Sep 2024 05:40:21 -0400 Subject: [PATCH] Bump jackson.version from 2.17.2 to 2.18.0 (#1036) * Bump jackson.version from 2.17.2 to 2.18.0 Bumps `jackson.version` from 2.17.2 to 2.18.0. Updates `com.fasterxml.jackson.core:jackson-core` from 2.17.2 to 2.18.0 - [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.17.2...jackson-core-2.18.0) Updates `com.fasterxml.jackson.core:jackson-databind` from 2.17.2 to 2.18.0 - [Commits](https://github.com/FasterXML/jackson/commits) Updates `com.fasterxml.jackson.datatype:jackson-datatype-jdk8` from 2.17.2 to 2.18.0 Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-xml` from 2.17.2 to 2.18.0 - [Commits](https://github.com/FasterXML/jackson-dataformat-xml/compare/jackson-dataformat-xml-2.17.2...jackson-dataformat-xml-2.18.0) Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-csv` from 2.17.2 to 2.18.0 - [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.17.2...jackson-dataformats-text-2.18.0) Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.17.2 to 2.18.0 --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-core dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jdk8 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-xml dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-csv dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * fix JsonAnySetter --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mike Barry --- .../archive/TileArchiveMetadata.java | 20 +++---------------- .../planetiler/pmtiles/Pmtiles.java | 7 +------ pom.xml | 2 +- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveMetadata.java b/planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveMetadata.java index fc0d4eca3b..a2928ea885 100644 --- a/planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveMetadata.java +++ b/planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveMetadata.java @@ -20,8 +20,6 @@ import java.util.TreeMap; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Envelope; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Metadata associated with a tile archive. @@ -49,6 +47,7 @@ public record TileArchiveMetadata( @JsonSerialize(using = TileArchiveMetadataDeSer.MetadataJsonSerializer.class) @JsonDeserialize(using = TileArchiveMetadataDeSer.MetadataJsonDeserializer.class) TileArchiveMetadataJson json, @JsonAnyGetter + @JsonAnySetter @JsonDeserialize(using = TileArchiveMetadataDeSer.EmptyMapIfNullDeserializer.class) Map others, @JsonProperty(COMPRESSION_KEY) TileCompression tileCompression ) { @@ -71,8 +70,6 @@ public record TileArchiveMetadata( public static final String MVT_FORMAT = "pbf"; - private static final Logger LOGGER = LoggerFactory.getLogger(TileArchiveMetadata.class); - public TileArchiveMetadata(Profile profile, PlanetilerConfig config) { this(profile, config, null); } @@ -94,7 +91,7 @@ public TileArchiveMetadata(Profile profile, PlanetilerConfig config, List mergeMaps(Map m1, Map m2) { + private static Map mergeMaps(Map m1, Map m2) { var result = new TreeMap<>(m1); result.putAll(m2); return result; } - @JsonAnySetter - private void putUnknownFieldsToOthers(String name, String value) { - others.put(name, value); - } - public record TileArchiveMetadataJson( @JsonProperty(VECTOR_LAYERS_KEY) List vectorLayers diff --git a/planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/Pmtiles.java b/planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/Pmtiles.java index c175d9747d..bfe80bfa12 100644 --- a/planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/Pmtiles.java +++ b/planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/Pmtiles.java @@ -363,7 +363,7 @@ public static List directoryFromBytes(byte[] bytes) { */ public record JsonMetadata( @JsonProperty("vector_layers") List vectorLayers, - @JsonAnyGetter Map otherMetadata + @JsonAnySetter @JsonAnyGetter Map otherMetadata ) { @JsonCreator @@ -371,11 +371,6 @@ public JsonMetadata(@JsonProperty("vector_layers") List()); } - @JsonAnySetter - private void setExtraMetadata(String key, String val) { - otherMetadata.put(key, val); - } - public byte[] toBytes() { try { diff --git a/pom.xml b/pom.xml index d14afd4cf7..dc9dc98cb0 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 21 21 true - 2.17.2 + 2.18.0 5.11.1 1.20.0 https://sonarcloud.io