Skip to content

Commit 270498c

Browse files
committed
Fix #2576
1 parent 98e1c1b commit 270498c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

release-notes/VERSION-2.x

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Project: jackson-databind
2020
(reported by Greg A)
2121
#2567: Incorrect target type for arrays when providing nulls and nulls are disabled
2222
(reported by João G)
23+
#2576: Fail to serialize `Enum` instance which includes a method override
24+
as POJO (shape = Shape.OBJECT)
25+
(reported by ylhuang-veeva@github)
2326

2427
2.10.1 (09-Nov-2019)
2528

src/main/java/com/fasterxml/jackson/databind/ser/BeanSerializerFactory.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ public JsonSerializer<Object> findBeanOrAddOnSerializer(SerializerProvider prov,
278278
// First things first: we know some types are not beans...
279279
if (!isPotentialBeanType(type.getRawClass())) {
280280
// 03-Aug-2012, tatu: Except we do need to allow serializers for Enums,
281-
// as per [databind#24]
282-
if (!type.isEnumType()) {
281+
// as per [databind#24], [databind#2576]
282+
if (!ClassUtil.isEnumType(type.getRawClass())) {
283283
return null;
284284
}
285285
}

0 commit comments

Comments
 (0)