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 io.prestosql.jdbc.$internal.jackson.databind.deser.impl;
import java.util.*;
import io.prestosql.jdbc.$internal.jackson.databind.DeserializationContext;
import io.prestosql.jdbc.$internal.jackson.databind.JavaType;
import io.prestosql.jdbc.$internal.jackson.databind.JsonDeserializer;
import io.prestosql.jdbc.$internal.jackson.databind.JsonMappingException;
import io.prestosql.jdbc.$internal.jackson.databind.deser.std.StdDelegatingDeserializer;
import io.prestosql.jdbc.$internal.jackson.databind.type.TypeFactory;
import io.prestosql.jdbc.$internal.jackson.databind.util.Converter;
/**
* Helper class used to contain logic for deserializing "special" containers
* from {@code java.util.Collections} and {@code java.util.Arrays}. This is needed
* because they do not have usable no-arguments constructor: however, are easy enough
* to deserialize using delegating deserializer.
*
* @since 2.9.4
*/
public abstract class JavaUtilCollectionsDeserializers
{
private final static int TYPE_SINGLETON_SET = 1;
private final static int TYPE_SINGLETON_LIST = 2;
private final static int TYPE_SINGLETON_MAP = 3;
private final static int TYPE_UNMODIFIABLE_SET = 4;
private final static int TYPE_UNMODIFIABLE_LIST = 5;
private final static int TYPE_UNMODIFIABLE_MAP = 6;
public final static int TYPE_AS_LIST = 7;
// 10-Jan-2018, tatu: There are a few "well-known" special containers in JDK too:
private final static Class> CLASS_AS_ARRAYS_LIST = Arrays.asList(null, null).getClass();
private final static Class> CLASS_SINGLETON_SET;
private final static Class> CLASS_SINGLETON_LIST;
private final static Class> CLASS_SINGLETON_MAP;
private final static Class> CLASS_UNMODIFIABLE_SET;
private final static Class> CLASS_UNMODIFIABLE_LIST;
/* 02-Mar-2019, tatu: for [databind#2265], need to consider possible alternate type...
* which we essentially coerce into the other one
*/
private final static Class> CLASS_UNMODIFIABLE_LIST_ALIAS;
private final static Class> CLASS_UNMODIFIABLE_MAP;
static {
Set> set = Collections.singleton(Boolean.TRUE);
CLASS_SINGLETON_SET = set.getClass();
CLASS_UNMODIFIABLE_SET = Collections.unmodifiableSet(set).getClass();
List> list = Collections.singletonList(Boolean.TRUE);
CLASS_SINGLETON_LIST = list.getClass();
CLASS_UNMODIFIABLE_LIST = Collections.unmodifiableList(list).getClass();
// for [databind#2265]
CLASS_UNMODIFIABLE_LIST_ALIAS = Collections.unmodifiableList(new LinkedList