diff --git a/metadata/com.fasterxml.jackson.core/jackson-databind/2.15.2/reflect-config.json b/metadata/com.fasterxml.jackson.core/jackson-databind/2.15.2/reflect-config.json index 2dded2ef7..bc4c0177c 100644 --- a/metadata/com.fasterxml.jackson.core/jackson-databind/2.15.2/reflect-config.json +++ b/metadata/com.fasterxml.jackson.core/jackson-databind/2.15.2/reflect-config.json @@ -68,5 +68,12 @@ "condition": { "typeReachable": "javax.xml.datatype.XMLGregorianCalendar" } + }, + { + "name": "com.fasterxml.jackson.databind.ext.Java7SupportImpl", + "allDeclaredConstructors": true, + "condition": { + "typeReachable": "com.fasterxml.jackson.databind.ext.Java7Support" + } } ] diff --git a/tests/src/com.fasterxml.jackson.core/jackson-databind/2.15.2/src/test/java/com_fasterxml_jackson_core/jackson_databind/JacksonConstructorPropertiesTest.java b/tests/src/com.fasterxml.jackson.core/jackson-databind/2.15.2/src/test/java/com_fasterxml_jackson_core/jackson_databind/JacksonConstructorPropertiesTest.java new file mode 100644 index 000000000..6842f1ad3 --- /dev/null +++ b/tests/src/com.fasterxml.jackson.core/jackson-databind/2.15.2/src/test/java/com_fasterxml_jackson_core/jackson_databind/JacksonConstructorPropertiesTest.java @@ -0,0 +1,41 @@ +/* + * Copyright and related rights waived via CC0 + * + * You should have received a copy of the CC0 legalcode along with this + * work. If not, see . + */ +package com_fasterxml_jackson_core.jackson_databind; + +import java.beans.ConstructorProperties; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class JacksonConstructorPropertiesTest { + + static final ObjectMapper mapper = new ObjectMapper(); + + @Test + void deserializeConstructorProperties() throws JsonProcessingException { + Foo foo = mapper.readValue("{ \"bar\": \"baz\" }", Foo.class); + assertThat(foo.getBar()).isEqualTo("baz"); + } + + static class Foo { + + private String bar; + + @ConstructorProperties("bar") + Foo(String bar) { + this.bar = bar; + } + + String getBar() { + return bar; + } + } + +} diff --git a/tests/src/com.fasterxml.jackson.core/jackson-databind/2.15.2/src/test/resources/META-INF/native-image/jackson-databind-test-metadata/reflect-config.json b/tests/src/com.fasterxml.jackson.core/jackson-databind/2.15.2/src/test/resources/META-INF/native-image/jackson-databind-test-metadata/reflect-config.json new file mode 100644 index 000000000..9cb9c0b06 --- /dev/null +++ b/tests/src/com.fasterxml.jackson.core/jackson-databind/2.15.2/src/test/resources/META-INF/native-image/jackson-databind-test-metadata/reflect-config.json @@ -0,0 +1,8 @@ +[ + { + "name": "com_fasterxml_jackson_core.jackson_databind.JacksonConstructorPropertiesTest$Foo", + "allDeclaredConstructors": true, + "allDeclaredMethods": true, + "allDeclaredFields": true + } +]