com.fitbur.jackson.databind.deser.impl.NoClassDefFoundDeserializer Maven / Gradle / Ivy
package com.fitbur.jackson.databind.deser.impl;
import java.io.IOException;
import com.fitbur.jackson.core.JsonParser;
import com.fitbur.jackson.databind.DeserializationContext;
import com.fitbur.jackson.databind.JsonDeserializer;
/**
* A deserializer that stores a {@link NoClassDefFoundError} error
* and throws the stored exception when attempting to deserialize
* a value. Null and empty values can be deserialized without error.
*
* @since 2.5
*/
public class NoClassDefFoundDeserializer extends JsonDeserializer
{
private final NoClassDefFoundError _cause;
public NoClassDefFoundDeserializer(NoClassDefFoundError cause)
{
_cause = cause;
}
@Override
public T deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException
{
throw _cause;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy