diff --git a/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/SerializationWrappedPolymorphicTest.java b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/SerializationWrappedPolymorphicTest.java index 3ce9fe44619..7ae3ca4b581 100644 --- a/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/SerializationWrappedPolymorphicTest.java +++ b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/SerializationWrappedPolymorphicTest.java @@ -51,7 +51,7 @@ static class TestCR extends CustomResource implements N static class TestCRSpec implements KubernetesResource { @JsonIgnore - private Map additionalProperties = new HashMap(); + private final Map additionalProperties = new HashMap<>(); private List children = new ArrayList<>(); diff --git a/kubernetes-model-generator/kubernetes-model-common/src/main/java/io/fabric8/kubernetes/model/jackson/BeanPropertyWriterDelegate.java b/kubernetes-model-generator/kubernetes-model-common/src/main/java/io/fabric8/kubernetes/model/jackson/BeanPropertyWriterDelegate.java index 7f73c2a76bc..944dacb5b55 100644 --- a/kubernetes-model-generator/kubernetes-model-common/src/main/java/io/fabric8/kubernetes/model/jackson/BeanPropertyWriterDelegate.java +++ b/kubernetes-model-generator/kubernetes-model-common/src/main/java/io/fabric8/kubernetes/model/jackson/BeanPropertyWriterDelegate.java @@ -16,8 +16,10 @@ package io.fabric8.kubernetes.model.jackson; import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.introspect.AnnotatedMember; +import com.fasterxml.jackson.databind.jsontype.TypeSerializer; import com.fasterxml.jackson.databind.ser.BeanPropertyWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -69,4 +71,19 @@ public void serializeAsField(Object bean, JsonGenerator gen, SerializerProvider delegate.getName(), valueInAnyGetter, bean.getClass().getName()); } } + + @Override + public void assignNullSerializer(JsonSerializer nullSer) { + delegate.assignNullSerializer(nullSer); + } + + @Override + public void assignSerializer(JsonSerializer ser) { + delegate.assignSerializer(ser); + } + + @Override + public void assignTypeSerializer(TypeSerializer typeSer) { + delegate.assignTypeSerializer(typeSer); + } }