kopia lustrzana https://github.com/onthegomap/planetiler
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] <support@github.com> * fix JsonAnySetter --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mike Barry <msb5014@gmail.com>pull/1044/head
rodzic
169627dea9
commit
ec6b09adf3
|
@ -20,8 +20,6 @@ import java.util.Map;
|
|||
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<String, String> 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 record TileArchiveMetadata(
|
|||
config.minzoom(),
|
||||
config.maxzoom(),
|
||||
vectorLayers == null ? null : new TileArchiveMetadataJson(vectorLayers),
|
||||
mergeMaps(mapWithBuildInfo(),profile.extraArchiveMetadata()),
|
||||
mergeMaps(mapWithBuildInfo(), profile.extraArchiveMetadata()),
|
||||
config.tileCompression()
|
||||
);
|
||||
}
|
||||
|
@ -170,23 +167,12 @@ public record TileArchiveMetadata(
|
|||
maxzoom, json, others, tileCompression);
|
||||
}
|
||||
|
||||
/*
|
||||
* few workarounds to make collect unknown fields to others work,
|
||||
* because @JsonAnySetter does not yet work on constructor/creator arguments
|
||||
* https://github.com/FasterXML/jackson-databind/issues/3439
|
||||
*/
|
||||
|
||||
private static Map<String,String> mergeMaps(Map<String,String> m1, Map<String,String> m2) {
|
||||
private static Map<String, String> mergeMaps(Map<String, String> m1, Map<String, String> 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<LayerAttrStats.VectorLayer> vectorLayers
|
||||
|
|
|
@ -363,7 +363,7 @@ public class Pmtiles {
|
|||
*/
|
||||
public record JsonMetadata(
|
||||
@JsonProperty("vector_layers") List<LayerAttrStats.VectorLayer> vectorLayers,
|
||||
@JsonAnyGetter Map<String, String> otherMetadata
|
||||
@JsonAnySetter @JsonAnyGetter Map<String, String> otherMetadata
|
||||
) {
|
||||
|
||||
@JsonCreator
|
||||
|
@ -371,11 +371,6 @@ public class Pmtiles {
|
|||
this(vectorLayers, new HashMap<>());
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
private void setExtraMetadata(String key, String val) {
|
||||
otherMetadata.put(key, val);
|
||||
}
|
||||
|
||||
public byte[] toBytes() {
|
||||
|
||||
try {
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -20,7 +20,7 @@
|
|||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<maven.source.excludeResources>true</maven.source.excludeResources>
|
||||
<jackson.version>2.17.2</jackson.version>
|
||||
<jackson.version>2.18.0</jackson.version>
|
||||
<junit.version>5.11.1</junit.version>
|
||||
<jts.version>1.20.0</jts.version>
|
||||
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
|
||||
|
|
Ładowanie…
Reference in New Issue