yu199195 commented on code in PR #4532:
URL: https://github.com/apache/shenyu/pull/4532#discussion_r1155778324


##########
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java:
##########
@@ -91,11 +91,10 @@ public Mono<Object> genericInvoker(final String body, final 
MetaData metaData, f
         })).onErrorMap(exception -> exception instanceof GenericException ? 
new ShenyuException(((GenericException) exception).getExceptionMessage()) : new 
ShenyuException(exception));
     }
     
-    @SuppressWarnings("unchecked")
     private CompletableFuture<Object> invokeAsync(final GenericService 
genericService, final String method, final String[] parameterTypes, final 
Object[] args) throws GenericException {
         //Compatible with asynchronous calls of lower Dubbo versions
         genericService.$invoke(method, parameterTypes, args);
-        Object resultFromFuture = RpcContext.getContext().getFuture();
-        return resultFromFuture instanceof CompletableFuture ? 
(CompletableFuture<Object>) resultFromFuture : 
CompletableFuture.completedFuture(resultFromFuture);
+        CompletableFuture<Object> future = 
RpcContext.getServiceContext().getCompletableFuture();

Review Comment:
   All  apache  dubbo version have this method?



-- 
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]

Reply via email to