type = factory.mapAbstractType(config, type);
private AnnotatedType resolveDeserializableType(Annotated accessor, AnnotatedType realType, JavaType baseType, ObjectMapper objectMapper) { AnnotationIntrospector introspector = objectMapper.getDeserializationConfig().getAnnotationIntrospector(); try { objectMapper.getDeserializationContext().getFactory().mapAbstractType(objectMapper.getDeserializationConfig(), objectMapper.constructType(Map.class)); JavaType refined = introspector.refineDeserializationType(objectMapper.getDeserializationConfig(), accessor, baseType); Class<?> raw = ClassUtils.getRawType(realType.getType()); if (!refined.getRawClass().equals(raw)) { if (GenericTypeReflector.isSuperType(realType.getType(), refined.getRawClass())) { AnnotatedType candidate = GenericTypeReflector.getExactSubType(realType, refined.getRawClass()); if (!ClassUtils.isMissingTypeParameters(candidate.getType())) { return candidate; } } return GenericTypeReflector.updateAnnotations(TypeUtils.toJavaType(refined), realType.getAnnotations()); } } catch (JsonMappingException e) { /*no-op*/ } catch (Exception e) { log.warn("Failed to determine the deserializable type for " + GenericTypeReflector.getTypeName(realType.getType()) + " due to an exception", e); } return realType; }
type = factory.mapAbstractType(config, type);
type = factory.mapAbstractType(config, type);
type = factory.mapAbstractType(config, type);
type = factory.mapAbstractType(config, type);
type = factory.mapAbstractType(config, type);
type = factory.mapAbstractType(config, type);