diff options
author | Tatu Saloranta <tatu.saloranta@iki.fi> | 2020-06-18 20:29:53 -0700 |
---|---|---|
committer | Tatu Saloranta <tatu.saloranta@iki.fi> | 2020-06-18 20:29:53 -0700 |
commit | 507297733ee2b667d7b7b0f53b02d82caf52e406 (patch) | |
tree | d53aae3eb69925a23c89efb644bdbc9c4ab8b975 /src/main/java/com/fasterxml | |
parent | 987ab8c97b4f5308f8e016052c75fa09d7ee8725 (diff) | |
download | jackson-databind-507297733ee2b667d7b7b0f53b02d82caf52e406.tar.gz |
Make `withProperties()` non-abstract (with dummy impl) just for 2.11, for improved compatibility
Diffstat (limited to 'src/main/java/com/fasterxml')
-rw-r--r-- | src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java | 15 |
1 files changed, 12 insertions, 3 deletions
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 271a93b9e..d8b3cb5ad 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 @@ -258,12 +258,21 @@ public abstract class BeanSerializerBase /** * Mutant factory used for creating a new instance with modified set - * of properties + * of properties. + *<p> + * Note: in 2.11.x, need to keep non-abstract for slightly better compatibility + * (XML module extends) * * @since 2.11.1 */ - protected abstract BeanSerializerBase withProperties(BeanPropertyWriter[] properties, - BeanPropertyWriter[] filteredProperties); + protected BeanSerializerBase withProperties(BeanPropertyWriter[] properties, + BeanPropertyWriter[] filteredProperties) { + return this; + } + + // Should be this, will be with 2.12: +// protected abstract BeanSerializerBase withProperties(BeanPropertyWriter[] properties, +// BeanPropertyWriter[] filteredProperties); /** * Copy-constructor that is useful for sub-classes that just want to |