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 2019/05/06 11:21:39 UTC

[GitHub] [skywalking] ascrutae commented on a change in pull request #2608: fix webflux cast exception.

ascrutae commented on a change in pull request #2608: fix webflux cast exception.
URL: https://github.com/apache/skywalking/pull/2608#discussion_r281144723
 
 

 ##########
 File path: apm-sniffer/apm-sdk-plugin/spring-plugins/webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/StatusInterceptor.java
 ##########
 @@ -29,10 +29,16 @@
     @Override
     public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
         MethodInterceptResult result) throws Throwable {
-        HttpResponseStatus status = (HttpResponseStatus)allArguments[0];
-        if (status.code() > 400) {
+        int code;
+        if (allArguments[0] instanceof Integer) {
 
 Review comment:
   The `HttpServerOperations21xInstrumentation.java` and `HttpServerOperations20xInstrumentation.java` had checked that the type of the first parameter is `HttpResponseStatus` and why need to check the arguments type again? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services