Skip to content

Commit 4651b40

Browse files
committed
Fix #2079
1 parent d98ae77 commit 4651b40

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

release-notes/VERSION-2.x

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Project: jackson-databind
99
#2060: `UnwrappingBeanPropertyWriter` incorrectly assumes the found serializer is
1010
of type `UnwrappingBeanSerializer`
1111
(reported by Petar T)
12+
#2079: NPE when visiting StaticListSerializerBase
13+
(reported by WorldSEnder@github)
1214
#2082: `FactoryBasedEnumDeserializer` should be cachable
1315
#2096: `TreeTraversingParser` does not take base64 variant into account
1416
(reported by tangiel@github)

src/main/java/com/fasterxml/jackson/databind/ser/std/StaticListSerializerBase.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ public JsonNode getSchema(SerializerProvider provider, Type typeHint) {
110110

111111
@Override
112112
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException {
113-
acceptContentVisitor(visitor.expectArrayFormat(typeHint));
113+
JsonArrayFormatVisitor v2 = visitor.expectArrayFormat(typeHint);
114+
if (v2 != null) {
115+
acceptContentVisitor(v2);
116+
}
114117
}
115118

116119
/*

0 commit comments

Comments
 (0)