Fix to correctly determine component type for non-generic arrays.

This commit is contained in:
Oliver Gierke
2011-03-17 10:06:18 +01:00
parent 688ae81b27
commit f00bfb82bd

View File

@@ -60,6 +60,10 @@ public class ClassTypeInformation extends TypeDiscoverer {
*/
@Override
public TypeInformation getComponentType() {
if (type.isArray()) {
return createInfo(type.getComponentType());
}
TypeVariable<?>[] typeParameters = type.getTypeParameters();
return typeParameters.length > 0 ? new TypeVariableTypeInformation(typeParameters[0], this.getType(), this) : null;