> Hi, @zhaixiaoxiang
> 
> ```
> if (type == char.class || type == Character.class) {
>     return value.length() > 0 ? value.charAt(0) : '\0';
> }
> ```
> Return '\0' may be confusing.
> 
> How about put the `if StringUtils.isRealBlank(value)` in the first line of 
> this method?
> But be careful if the '\0' is used in other place.

ClassHelper.convertPrimitive() is only used in exactly one place, and '\0' is 
not used, so I remove '\0'.

```
if (StringUtils.isNotEmpty(value) && 
ClassHelper.isTypeMatch(method.getParameterTypes()[0], value)) {
    method.invoke(this, 
ClassHelper.convertPrimitive(method.getParameterTypes()[0], value));
}
``` 

[ Full content available at: 
https://github.com/apache/incubator-dubbo/pull/3076 ]
This message was relayed via gitbox.apache.org for 
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to