From 391c91a9ce1a2d260e5ae26786b63bca285a8bf9 Mon Sep 17 00:00:00 2001 From: Aritz Bastida Date: Wed, 19 May 2021 15:41:23 +0200 Subject: [PATCH] Undo changes from databind#631, to avoid side-effects in Squiggly library (implemented as a Jackson Property Filter) Reported here: https://github.com/FasterXML/jackson-databind/issues/3160 --- pom.xml | 2 +- .../jackson/databind/ser/std/BeanSerializerBase.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index fbf08c7245..4209709141 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.fasterxml.jackson.core jackson-databind - 2.10.5.1 + 2.10.5.1-telco-1 jackson-databind bundle General data-binding functionality for Jackson: works on core streaming API diff --git a/src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java b/src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java index b7eba96bbf..707a8db611 100644 --- a/src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java +++ b/src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java @@ -593,12 +593,12 @@ public void serializeWithType(Object bean, JsonGenerator gen, throws IOException { if (_objectIdWriter != null) { - gen.setCurrentValue(bean); // [databind#631] + //gen.setCurrentValue(bean); // [databind#631] _serializeWithObjectId(bean, gen, provider, typeSer); return; } - gen.setCurrentValue(bean); // [databind#631] + //gen.setCurrentValue(bean); // [databind#631] WritableTypeId typeIdDef = _typeIdDef(typeSer, bean, JsonToken.START_OBJECT); typeSer.writeTypePrefix(gen, typeIdDef); if (_propertyFilterId != null) {