Fix #2079
diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x
index 89059df..22376cf 100644
--- a/release-notes/VERSION-2.x
+++ b/release-notes/VERSION-2.x
@@ -9,6 +9,8 @@
#2060: `UnwrappingBeanPropertyWriter` incorrectly assumes the found serializer is
of type `UnwrappingBeanSerializer`
(reported by Petar T)
+#2079: NPE when visiting StaticListSerializerBase
+ (reported by WorldSEnder@github)
#2082: `FactoryBasedEnumDeserializer` should be cachable
#2096: `TreeTraversingParser` does not take base64 variant into account
(reported by tangiel@github)
diff --git a/src/main/java/com/fasterxml/jackson/databind/ser/std/StaticListSerializerBase.java b/src/main/java/com/fasterxml/jackson/databind/ser/std/StaticListSerializerBase.java
index 84ac2ba..32594d8 100644
--- a/src/main/java/com/fasterxml/jackson/databind/ser/std/StaticListSerializerBase.java
+++ b/src/main/java/com/fasterxml/jackson/databind/ser/std/StaticListSerializerBase.java
@@ -110,7 +110,10 @@
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException {
- acceptContentVisitor(visitor.expectArrayFormat(typeHint));
+ JsonArrayFormatVisitor v2 = visitor.expectArrayFormat(typeHint);
+ if (v2 != null) {
+ acceptContentVisitor(v2);
+ }
}
/*