Skip to content

Commit c5a18af

Browse files
committed
Fix incompatibility with Jackson 2.17.0-rc1
`@JsonSerialize(contentConverter = ...)` is incompatible with property type `Optional<List<T>>`, which is the detected serialization type because of the auto-detected getter, because `contentConverter` only descends one container level. See: FasterXML/jackson-databind#4413 (comment)
1 parent eb37b61 commit c5a18af

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

NEWS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
Changes:
44

55
* Dropped dependency on COSE-Java.
6-
* Excluded Jackson version 2.17.0-rc1 from dependency resolution due to an
7-
incompatible regression.
6+
* Fixed incompatibility with Jackson version 2.17.0-rc1.
87

98

109
== Version 2.5.0 ==

settings.gradle.kts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ dependencyResolutionManagement {
1919
library("httpclient5", "org.apache.httpcomponents.client5:httpclient5:[5.0.0,6)")
2020
library("slf4j", "org.slf4j:slf4j-api:[1.7.25,3)")
2121

22-
val jacksonVer = version("jackson") {
23-
require("[2.13.2.1,3)")
24-
reject("2.17.0-rc1") // Regression: https://github.com/FasterXML/jackson-databind/issues/4413
25-
}
22+
val jacksonVer = version("jackson", "[2.13.2.1,3)")
2623
library("jackson-bom", "com.fasterxml.jackson", "jackson-bom").versionRef(jacksonVer)
2724
library("jackson-databind", "com.fasterxml.jackson.core", "jackson-databind").versionRef(jacksonVer)
2825
library("jackson-dataformat-cbor", "com.fasterxml.jackson.dataformat", "jackson-dataformat-cbor").versionRef(jacksonVer)

webauthn-server-attestation/src/main/java/com/yubico/fido/metadata/MetadataBLOBHeader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.yubico.fido.metadata;
22

3+
import com.fasterxml.jackson.annotation.JsonIgnore;
34
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
45
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
56
import java.net.URL;
@@ -86,6 +87,9 @@ public Optional<URL> getX5u() {
8687
* @see <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.6">RFC 7515 §4.1.6.
8788
* "x5c" (X.509 Certificate Chain) Header Parameter</a>
8889
*/
90+
// @JsonIgnore needed because of:
91+
// https://github.com/FasterXML/jackson-databind/issues/4413#issuecomment-1977989776
92+
@JsonIgnore
8993
public Optional<List<X509Certificate>> getX5c() {
9094
return Optional.ofNullable(x5c);
9195
}

0 commit comments

Comments
 (0)