Remove params type size check in MapTypeBuilder (#9848)

fixes #5122 & #8212
This commit is contained in:
Wang Chengming 2022-04-01 11:06:52 +08:00 committed by GitHub
parent 1222676fad
commit 3a8e5e6c0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 8 deletions

View File

@ -21,8 +21,6 @@ import org.apache.dubbo.metadata.definition.model.TypeDefinition;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.Map;
import static org.apache.dubbo.common.utils.TypeUtils.getRawClass;
@ -52,12 +50,6 @@ public class MapTypeBuilder implements TypeBuilder {
Type[] actualTypeArgs = parameterizedType.getActualTypeArguments();
int actualTypeArgsLength = actualTypeArgs == null ? 0 : actualTypeArgs.length;
if (actualTypeArgsLength != 2) {
throw new IllegalArgumentException(MessageFormat.format(
"[ServiceDefinitionBuilder] Map type [{0}] with unexpected amount of arguments [{1}]."
+ Arrays.toString(actualTypeArgs), type, actualTypeArgs));
}
String mapType = type.toString();
TypeDefinition typeDefinition = new TypeDefinition(mapType);