这个代码在dubbo2.7.5中就是没有这个if检查的,
 ```
if (loadbalance == null) {
            loadbalance = 
ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(Constants.DEFAULT_LOADBALANCE);
```
单元测试是不应该承担错误,但是也要根据情况,不一定所有的方法中都要给方法参数设置默认值.
在方法调用前就应该做判断. 扩展该类的开发者本身就应该进行空指针检查.


[ Full content available at: https://github.com/apache/dubbo/pull/5657 ]
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