Java Code Examples for com.fasterxml.jackson.databind.util.ClassUtil#nonNullString()

The following examples show how to use com.fasterxml.jackson.databind.util.ClassUtil#nonNullString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeDeserializerBase.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @since 2.8
 */
protected TypeDeserializerBase(JavaType baseType, TypeIdResolver idRes,
        String typePropertyName, boolean typeIdVisible, JavaType defaultImpl)
{
    _baseType = baseType;
    _idResolver = idRes;
    _typePropertyName = ClassUtil.nonNullString(typePropertyName);
    _typeIdVisible = typeIdVisible;
    // defaults are fine, although shouldn't need much concurrency
    _deserializers = new ConcurrentHashMap<String, JsonDeserializer<Object>>(16, 0.75f, 2);
    _defaultImpl = defaultImpl;
    _property = null;
}
 
Example 2
Source File: PropertyName.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public PropertyName(String simpleName, String namespace)
{
    _simpleName = ClassUtil.nonNullString(simpleName);
    _namespace = namespace;
}
 
Example 3
Source File: AsWrapperTypeSerializer.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Helper method used to ensure that intended type id is output as something that is valid:
 * currently only used to ensure that `null` output is converted to an empty String.
 *
 * @since 2.6
 */
protected String _validTypeId(String typeId) {
    return ClassUtil.nonNullString(typeId);
}