Skip to content

Commit 9bef79f

Browse files
committed
removed assertions
1 parent b4fea47 commit 9bef79f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2010 the original author or authors.
2+
* Copyright 2002-2011 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -279,9 +279,6 @@ public Class<?> getElementType() {
279279
* Return the element type as a type descriptor.
280280
*/
281281
public synchronized TypeDescriptor getElementTypeDescriptor() {
282-
if (!isCollection() && !isArray()) {
283-
throw new IllegalStateException("Not a collection or array type");
284-
}
285282
if (this.elementType == null) {
286283
this.elementType = resolveElementTypeDescriptor();
287284
}
@@ -309,9 +306,6 @@ public Class<?> getMapKeyType() {
309306
* Returns map key type as a type descriptor.
310307
*/
311308
public synchronized TypeDescriptor getMapKeyTypeDescriptor() {
312-
if (!isMap()) {
313-
throw new IllegalStateException("Not a Map type");
314-
}
315309
if (this.mapKeyType == null) {
316310
this.mapKeyType = resolveMapKeyTypeDescriptor();
317311
}

0 commit comments

Comments
 (0)