Consistent references to primitive types (in alphabetical order)
(cherry picked from commit 08dad4e)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -54,12 +54,12 @@ public class TypeDescriptor implements Serializable {
|
||||
private static final boolean streamAvailable = ClassUtils.isPresent(
|
||||
"java.util.stream.Stream", TypeDescriptor.class.getClassLoader());
|
||||
|
||||
private static final Map<Class<?>, TypeDescriptor> commonTypesCache = new HashMap<Class<?>, TypeDescriptor>(18);
|
||||
private static final Map<Class<?>, TypeDescriptor> commonTypesCache = new HashMap<Class<?>, TypeDescriptor>(32);
|
||||
|
||||
private static final Class<?>[] CACHED_COMMON_TYPES = {
|
||||
boolean.class, Boolean.class, byte.class, Byte.class, char.class, Character.class,
|
||||
double.class, Double.class, int.class, Integer.class, long.class, Long.class,
|
||||
float.class, Float.class, short.class, Short.class, String.class, Object.class};
|
||||
double.class, Double.class, float.class, Float.class, int.class, Integer.class,
|
||||
long.class, Long.class, short.class, Short.class, String.class, Object.class};
|
||||
|
||||
static {
|
||||
for (Class<?> preCachedClass : CACHED_COMMON_TYPES) {
|
||||
|
||||
Reference in New Issue
Block a user