BitoAgent commented on code in PR #13786:
URL: https://github.com/apache/dubbo/pull/13786#discussion_r1543381771
##########
dubbo-common/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java:
##########
@@ -252,7 +252,7 @@
}
if (CollectionUtils.isNotEmpty(this.registries)) {
this.registries.forEach(registryConfig -> {
- if (registryConfig.getScopeModel() != applicationModel) {
+ if (registryConfig != null && registryConfig.getScopeModel()
!= applicationModel) {
Review Comment:
**Suggestion**: Add null check for registryConfig to avoid potential
NullPointerException. <br> **Code Suggestion**:
```
+ if (registryConfig != null &&
registryConfig.getScopeModel() != applicationModel) {
```
##########
dubbo-common/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java:
##########
@@ -221,7 +221,7 @@ public AbstractInterfaceConfig(ModuleModel moduleModel) {
/**
* The url of the reference service
*/
- protected final transient List<URL> urls = new ArrayList<URL>();
+ protected final transient List<URL> urls = new ArrayList<>();
Review Comment:
**Suggestion**: Utilize the diamond operator for initializing the ArrayList
to improve code readability. <br> **Code Suggestion**:
```
+ protected final transient List<URL> urls = new ArrayList<>();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]