You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/24 09:55:08 UTC

[GitHub] [skywalking-java] wu-sheng commented on a diff in pull request #164: Fix NPE in gateway plugin when the timer triggers webflux webclient call

wu-sheng commented on code in PR #164:
URL: https://github.com/apache/skywalking-java/pull/164#discussion_r857100030


##########
apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java:
##########
@@ -45,6 +45,11 @@ public void beforeMethod(final EnhancedInstance objInst,
                              final Object[] allArguments,
                              final Class<?>[] argumentsTypes,
                              final MethodInterceptResult result) throws Throwable {
+        
+        if (!ContextManager.isActive()) {
+            return;
+        }

Review Comment:
   Please give a clear comment at here about what are the cases there is no active context. 
   
   I know you mentioned it in the PR description, but you should put a formal one here and others too.



-- 
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@skywalking.apache.org

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