DATACMNS-1755 - Rename uppercase 'CACHE' static finals.
Rename static final `CACHE` members to use the lowercase form. Although the caches are static final, they are not constant values. Original pull request: #448.
This commit is contained in:
committed by
Mark Paluch
parent
df5f42ce29
commit
cb8443e299
@@ -50,7 +50,7 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
private static final String ALL_UPPERCASE = "[A-Z0-9._$]+";
|
||||
private static final Pattern SPLITTER = Pattern.compile("(?:[%s]?([%s]*?[^%s]+))".replaceAll("%s", DELIMITERS));
|
||||
private static final Pattern SPLITTER_FOR_QUOTED = Pattern.compile("(?:[%s]?([%s]*?[^%s]+))".replaceAll("%s", "\\."));
|
||||
private static final Map<Key, PropertyPath> CACHE = new ConcurrentReferenceHashMap<>();
|
||||
private static final Map<Key, PropertyPath> cache = new ConcurrentReferenceHashMap<>();
|
||||
|
||||
private final TypeInformation<?> owningType;
|
||||
private final String name;
|
||||
@@ -345,7 +345,7 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
Assert.hasText(source, "Source must not be null or empty!");
|
||||
Assert.notNull(type, "TypeInformation must not be null or empty!");
|
||||
|
||||
return CACHE.computeIfAbsent(Key.of(type, source), it -> {
|
||||
return cache.computeIfAbsent(Key.of(type, source), it -> {
|
||||
|
||||
List<String> iteratorSource = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
*/
|
||||
static class KotlinCopyUtil {
|
||||
|
||||
private static final Map<Class<?>, KCallable<?>> COPY_METHOD_CACHE = new ConcurrentReferenceHashMap<>();
|
||||
private static final Map<Class<?>, KCallable<?>> copyMethodCache = new ConcurrentReferenceHashMap<>();
|
||||
|
||||
/**
|
||||
* Set a single property by calling {@code copy(…)} on a Kotlin data class. Copying creates a new instance that
|
||||
@@ -176,7 +176,7 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
static <T> Object setProperty(PersistentProperty<?> property, T bean, @Nullable Object value) {
|
||||
|
||||
Class<?> type = property.getOwner().getType();
|
||||
KCallable<?> copy = COPY_METHOD_CACHE.computeIfAbsent(type, it -> getCopyMethod(it, property));
|
||||
KCallable<?> copy = copyMethodCache.computeIfAbsent(type, it -> getCopyMethod(it, property));
|
||||
|
||||
if (copy == null) {
|
||||
throw new UnsupportedOperationException(String.format(
|
||||
|
||||
Reference in New Issue
Block a user