BitoAgent commented on code in PR #13786:
URL: https://github.com/apache/dubbo/pull/13786#discussion_r1544735335
##########
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**: Good use of the diamond operator to simplify the
instantiation of generic classes. This keeps the code cleaner and easier to
read. <br> **Code Suggestion**:
```
No further code suggestion required, the change is appropriate.
```
##########
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**: Adding a null check before accessing the 'getScopeModel()'
method is a good practice to avoid potential NullPointerExceptions. <br> **Code
Suggestion**:
```
The provided change correctly implements the suggested improvement.
```
--
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]