You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "khanimteyaz (GitHub)" <gi...@apache.org> on 2019/01/10 16:41:26 UTC

[GitHub] [incubator-dubbo] khanimteyaz commented on pull request #3185: [Dubbo-3169]Check future status before get(), return default value if not completed yet.

I think the whole method can be simplified by 

```
public Result getRpcResult() {
        try {
            if (resultFuture.isDone()) {
                return resultFuture.get();
            }
        } catch (Exception e) {
            // This should never happen;
            logger.error("Got exception when trying to fetch the underlying result of AsyncRpcResult.", e);
        }
        return new RpcResult();
    }
```

what do you say?

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3185 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org