You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "lkj41110 (GitHub)" <gi...@apache.org> on 2019/12/01 05:55:07 UTC

[GitHub] [dubbo] lkj41110 commented on issue #5403: improve InvokerInvocationHandler#invoke

> This change is quite clean to me. but I'm a litte concern about code readability.
> 
> Original code is check method name first and then check params, it's straightforward to understand.
> Refactored code will check params first and then check method name.
> 
> I would like to wait sometime to see other opinion.

`Original code is check method name first and then check params`,我也比较同意这个。
用`&&`时,当前面的表达式不成立的时候不会对参数个数进行判断了,而这个修改先判断参数个数,理论上增加了判断的次数

[ Full content available at: https://github.com/apache/dubbo/pull/5403 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org