You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/26 12:36:51 UTC

[GitHub] [dubbo] wangchengming666 commented on a change in pull request #8927: [master] Fix #8240, on branch master, when provider and consumer stop cause NPE

wangchengming666 commented on a change in pull request #8927:
URL: https://github.com/apache/dubbo/pull/8927#discussion_r716198075



##########
File path: dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ApplicationModel.java
##########
@@ -119,7 +119,7 @@ public static String tryGetApplication() {
             return application;
         }
         Optional<ApplicationConfig> appCfgOptional = getConfigManager().getApplication();
-        return appCfgOptional.isPresent() ? appCfgOptional.get().getName() : null;
+        return appCfgOptional.map(ApplicationConfig::getName).orElse(null);

Review comment:
       done




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org