Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.fasterxml.jackson.databind.deser.std;
import java.io.IOException;
import java.util.Arrays;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.deser.BeanDeserializer;
import com.fasterxml.jackson.databind.deser.SettableBeanProperty;
import com.fasterxml.jackson.databind.util.NameTransformer;
/**
* Deserializer that builds on basic {@link BeanDeserializer} but
* override some aspects like instance construction.
*/
public class ThrowableDeserializer
extends BeanDeserializer // not the greatest idea but...
{
private static final long serialVersionUID = 1L;
protected final static String PROP_NAME_MESSAGE = "message";
protected final static String PROP_NAME_SUPPRESSED = "suppressed";
protected final static String PROP_NAME_LOCALIZED_MESSAGE = "localizedMessage";
/*
/**********************************************************************
/* Life-cycle
/**********************************************************************
*/
/**
* Alternative constructor used when creating "unwrapping" deserializers
*/
protected ThrowableDeserializer(BeanDeserializer src, NameTransformer unwrapper) {
super(src, unwrapper);
// need to disable this, since we do post-processing
_vanillaProcessing = false;
}
@Deprecated // since 2.14
public ThrowableDeserializer(BeanDeserializer baseDeserializer) {
this(baseDeserializer, null);
}
public static ThrowableDeserializer construct(DeserializationContext ctxt,
BeanDeserializer baseDeserializer)
{
// 27-May-2022, tatu: TODO -- handle actual renaming of fields to support
// strategies like kebab- and snake-case where there are changes beyond
// simple upper-/lower-casing
/*
PropertyNamingStrategy pts = ctxt.getConfig().getPropertyNamingStrategy();
if (pts != null) {
}
*/
return new ThrowableDeserializer(baseDeserializer, (NameTransformer) null);
}
@Override
public JsonDeserializer