From 96bc59633314d6e450dffadc721ce0843fd04733 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Thu, 13 Sep 2012 19:21:10 +0200 Subject: [PATCH] DATACMNS-176 - ClassTypeInformation now always inspects user class. Unwrap potentially wrapped CBGlib classes handed to ClassTypeInformation for inspection. --- .../org/springframework/data/util/ClassTypeInformation.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-data-commons-core/src/main/java/org/springframework/data/util/ClassTypeInformation.java b/spring-data-commons-core/src/main/java/org/springframework/data/util/ClassTypeInformation.java index 00011683d..cbcd48c67 100644 --- a/spring-data-commons-core/src/main/java/org/springframework/data/util/ClassTypeInformation.java +++ b/spring-data-commons-core/src/main/java/org/springframework/data/util/ClassTypeInformation.java @@ -29,6 +29,7 @@ import java.util.Set; import java.util.WeakHashMap; import org.springframework.core.GenericTypeResolver; +import org.springframework.util.ClassUtils; /** * {@link TypeInformation} for a plain {@link Class}. @@ -91,12 +92,12 @@ public class ClassTypeInformation extends TypeDiscoverer { * * @param type */ - public ClassTypeInformation(Class type) { + ClassTypeInformation(Class type) { this(type, GenericTypeResolver.getTypeVariableMap(type)); } ClassTypeInformation(Class type, Map typeVariableMap) { - super(type, typeVariableMap); + super(ClassUtils.getUserClass(type), typeVariableMap); this.type = type; }