Polishing

This commit is contained in:
Juergen Hoeller
2016-11-22 14:57:00 +01:00
parent 85b0ce1ef7
commit 9bf4d7cf4e
5 changed files with 29 additions and 20 deletions

View File

@@ -438,7 +438,7 @@ public class TypeDescriptor implements Serializable {
return false;
}
TypeDescriptor other = (TypeDescriptor) obj;
if (!ObjectUtils.nullSafeEquals(this.type, other.type)) {
if (!ObjectUtils.nullSafeEquals(getType(), other.getType())) {
return false;
}
if (getAnnotations().length != other.getAnnotations().length) {

View File

@@ -68,16 +68,15 @@ public class GenericConversionService implements ConfigurableConversionService {
private static final GenericConverter NO_OP_CONVERTER = new NoOpConverter("NO_OP");
/**
* Used as a cache entry when no converter is available. This converter is never
* returned.
* Used as a cache entry when no converter is available.
* This converter is never returned.
*/
private static final GenericConverter NO_MATCH = new NoOpConverter("NO_MATCH");
private final Converters converters = new Converters();
private final Map<ConverterCacheKey, GenericConverter> converterCache =
new ConcurrentReferenceHashMap<>(64);
private final Map<ConverterCacheKey, GenericConverter> converterCache = new ConcurrentReferenceHashMap<>(64);
// ConverterRegistry implementation
@@ -489,8 +488,7 @@ public class GenericConversionService implements ConfigurableConversionService {
private final Set<GenericConverter> globalConverters = new LinkedHashSet<>();
private final Map<ConvertiblePair, ConvertersForPair> converters =
new LinkedHashMap<>(36);
private final Map<ConvertiblePair, ConvertersForPair> converters = new LinkedHashMap<>(36);
public void add(GenericConverter converter) {
Set<ConvertiblePair> convertibleTypes = converter.getConvertibleTypes();