Skip to content

Commit

Permalink
on branch 2.7, fix #9847
Browse files Browse the repository at this point in the history
  • Loading branch information
呈铭 committed Mar 29, 2022
1 parent 1222676 commit f29433b
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

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;
Expand Down Expand Up @@ -52,12 +50,6 @@ public TypeDefinition build(Type type, Class<?> clazz, Map<Class<?>, TypeDefinit
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);
Expand Down

0 comments on commit f29433b

Please sign in to comment.