allow for null
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@964 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
9f5676a4b1
commit
10eb34649b
|
|
@ -137,7 +137,8 @@ public class TypeDescriptor {
|
||||||
* Is this type an array type?
|
* Is this type an array type?
|
||||||
*/
|
*/
|
||||||
public boolean isArray() {
|
public boolean isArray() {
|
||||||
return getType().isArray();
|
Class<?> type = getType();
|
||||||
|
return (type==null?false:type.isArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -280,7 +281,11 @@ public class TypeDescriptor {
|
||||||
// TODO should properly handle multi dimensional arrays
|
// TODO should properly handle multi dimensional arrays
|
||||||
stringValue.append(getArrayComponentType().getName()).append("[]");
|
stringValue.append(getArrayComponentType().getName()).append("[]");
|
||||||
} else {
|
} else {
|
||||||
stringValue.append(getType().getName());
|
Class<?> clazz = getType();
|
||||||
|
if (clazz==null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
stringValue.append(clazz.getName());
|
||||||
if (isCollection()) {
|
if (isCollection()) {
|
||||||
Class<?> collectionType = getCollectionElementType();
|
Class<?> collectionType = getCollectionElementType();
|
||||||
if (collectionType!=null) {
|
if (collectionType!=null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue