Polishing

This commit is contained in:
Juergen Hoeller
2018-07-18 14:03:54 +02:00
parent 55563c16b5
commit c0040a5508
52 changed files with 331 additions and 253 deletions

View File

@@ -19,6 +19,7 @@ package org.springframework.core.convert.support;
import java.util.Locale;
import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils;
/**
@@ -35,6 +36,7 @@ import org.springframework.util.StringUtils;
final class StringToLocaleConverter implements Converter<String, Locale> {
@Override
@Nullable
public Locale convert(String source) {
return StringUtils.parseLocale(source);
}

View File

@@ -651,9 +651,9 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
return null;
}
@SuppressWarnings("unchecked")
@SuppressWarnings({"rawtypes", "unchecked"})
private Reference<K, V>[] createReferenceArray(int size) {
return (Reference<K, V>[]) Array.newInstance(Reference.class, size);
return new Reference[size];
}
private int getIndex(int hash, Reference<K, V>[] references) {