Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.databind.deser.impl;
 
To support [JACKSON-420] we need bit more indirection; this is used to produce artificial failure for primitives that don't accept JSON null as value.
public final class NullProvider
    implements java.io.Serializable
    private static final long serialVersionUID = 1L;
    private final Object _nullValue;
    private final boolean _isPrimitive;
    
    private final Class<?> _rawType;
    
    public NullProvider(JavaType typeObject nullValue)
    {
         = nullValue;
        // [JACKSON-420]
         = type.isPrimitive();
         = type.getRawClass();
    }
    {
            throw ctxt.mappingException("Can not map JSON null into type "+.getName()
                    +" (set DeserializationConfig.DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES to 'false' to allow)");
        }
        return ;
    }
New to GrepCode? Check out our FAQ X