From c3054bbcf262dfc2002e9ffb1aecc3f718b60d92 Mon Sep 17 00:00:00 2001 From: joohyukkim Date: Wed, 11 Dec 2024 23:51:06 +0900 Subject: [PATCH] add test --- ...nceWithStdTypeResolverBuilder4838Test.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/test/java/com/fasterxml/jackson/databind/AtomicReferenceWithStdTypeResolverBuilder4838Test.java diff --git a/src/test/java/com/fasterxml/jackson/databind/AtomicReferenceWithStdTypeResolverBuilder4838Test.java b/src/test/java/com/fasterxml/jackson/databind/AtomicReferenceWithStdTypeResolverBuilder4838Test.java new file mode 100644 index 0000000000..11116a420a --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/databind/AtomicReferenceWithStdTypeResolverBuilder4838Test.java @@ -0,0 +1,27 @@ +package com.fasterxml.jackson.databind; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; + +import java.util.concurrent.atomic.AtomicReference; + +public class AtomicReferenceWithStdTypeResolverBuilder4838Test + extends BaseMapTest +{ + static class Wrapper4383Test { + public AtomicReference ref; + } + + public void testPropertyAnnotationForReferences() throws Exception { + Wrapper4383Test w = new ObjectMapper() + .setDefaultTyping( + new StdTypeResolverBuilder() + .init(JsonTypeInfo.Id.CLASS, null) + .inclusion(JsonTypeInfo.As.WRAPPER_OBJECT)) + .readValue("{\"ref\": 99}", Wrapper4383Test.class); + + assertNotNull(w); + assertNotNull(w.ref); + } + +}