DATAKV-48

+ eliminate some of the Jackson unchecked warnings
This commit is contained in:
Costin Leau
2011-03-17 09:46:16 +02:00
parent 3757419ae1
commit 96bd74cb22

View File

@@ -30,7 +30,7 @@ public class JacksonHashMapper<T> implements HashMapper<T, String, Object> {
private final ObjectMapper mapper;
private final JavaType userType;
private final JavaType mapType = TypeFactory.type(Map.class);
private final JavaType mapType = TypeFactory.mapType(Map.class, String.class, Object.class);
public JacksonHashMapper(Class<T> type) {
this(type, new ObjectMapper());
@@ -47,7 +47,6 @@ public class JacksonHashMapper<T> implements HashMapper<T, String, Object> {
return (T) mapper.convertValue(hash, userType);
}
@SuppressWarnings("unchecked")
@Override
public Map<String, Object> toHash(T object) {
return mapper.convertValue(object, mapType);