diff --git a/src/main/java/org/springframework/data/convert/DefaultTypeMapper.java b/src/main/java/org/springframework/data/convert/DefaultTypeMapper.java index 9bc99009b..87abbef21 100644 --- a/src/main/java/org/springframework/data/convert/DefaultTypeMapper.java +++ b/src/main/java/org/springframework/data/convert/DefaultTypeMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2013 the original author or authors. + * Copyright 2011-2016 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. @@ -50,7 +50,7 @@ public class DefaultTypeMapper implements TypeMapper { * @param accessor must not be {@literal null}. */ public DefaultTypeMapper(TypeAliasAccessor accessor) { - this(accessor, Arrays.asList(SimpleTypeInformationMapper.INSTANCE)); + this(accessor, Arrays.asList(new SimpleTypeInformationMapper())); } /** diff --git a/src/main/java/org/springframework/data/convert/SimpleTypeInformationMapper.java b/src/main/java/org/springframework/data/convert/SimpleTypeInformationMapper.java index 9fe19ba6d..52ee2de64 100644 --- a/src/main/java/org/springframework/data/convert/SimpleTypeInformationMapper.java +++ b/src/main/java/org/springframework/data/convert/SimpleTypeInformationMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2014 the original author or authors. + * Copyright 2011-2016 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. @@ -32,8 +32,7 @@ import org.springframework.util.StringUtils; */ public class SimpleTypeInformationMapper implements TypeInformationMapper { - public static final SimpleTypeInformationMapper INSTANCE = new SimpleTypeInformationMapper(); - private static final Map> CACHE = new ConcurrentHashMap>(); + private final Map> CACHE = new ConcurrentHashMap>(); /** * Returns the {@link TypeInformation} that shall be used when the given {@link String} value is found as type hint.