diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java index de96eebda18..efc570fe925 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java @@ -104,15 +104,10 @@ public static Object compatibleTypeConvert(Object value, Class type) { // Process string to char array for generic invoke // See // - https://github.com/apache/incubator-dubbo/issues/2003 - if (string == null) { - return null; - } - else { - int len = string.length(); - char[] chars = new char[len]; - string.getChars(0, len, chars, 0); - return chars; - } + int len = string.length(); + char[] chars = new char[len]; + string.getChars(0, len, chars, 0); + return chars; } } else if (value instanceof Number) { Number number = (Number) value;