Skip to content

Commit 2149c30

Browse files
committed
minor clean up wrt #2605 fix, for 2.11
1 parent 37e50bd commit 2149c30

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/java/com/fasterxml/jackson/databind/JavaType.java

+8
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ public boolean isConcrete() {
288288
@Override
289289
public boolean isArrayType() { return false; }
290290

291+
/**
292+
* Method that basically does equivalent of:
293+
*<pre>
294+
* Enum.class.isAssignableFrom(getRawClass())
295+
*</pre>
296+
* that is, return {@code true} if the underlying type erased class is {@code Enum}
297+
* or one its subtypes (Enum implementations).
298+
*/
291299
@Override
292300
public final boolean isEnumType() {
293301
// 29-Sep-2019, tatu: `Class.isEnum()` not enough to detect custom subtypes.

src/main/java/com/fasterxml/jackson/databind/deser/DeserializerCache.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ protected JsonDeserializer<?> _createDeserializer2(DeserializationContext ctxt,
367367

368368
// 12-Feb-20202, tatu: Need to ensure that not only all Enum implementations get
369369
// there, but also `Enum` -- latter wrt [databind#2605], polymorphic usage
370-
if (ClassUtil.isEnumType(type.getRawClass())) { // type.isEnumType()) {
370+
if (type.isEnumType()) {
371371
return factory.createEnumDeserializer(ctxt, type, beanDesc);
372372
}
373373
if (type.isContainerType()) {

0 commit comments

Comments
 (0)