Remove params type size check in MapTypeBuilder (#9848)
fixes #5122 & #8212
This commit is contained in:
parent
1222676fad
commit
3a8e5e6c0c
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue