[
https://issues.apache.org/jira/browse/IGNITE-23659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksandr Polovtsev updated IGNITE-23659:
-----------------------------------------
Description:
I've stumbled upon the following pattern in some places when working with
CompletableFutures:
{code:java}
f.handle((v, e) -> {
if (e != null) {
// do something
sneakyThrow(e);
} else {
return v;
}
});
{code}
This is wrong API usage, this pattern can be replaced with a simple
`whenComplete` call.
> Some usages of sneakyThrow can be removed
> -----------------------------------------
>
> Key: IGNITE-23659
> URL: https://issues.apache.org/jira/browse/IGNITE-23659
> Project: Ignite
> Issue Type: Improvement
> Reporter: Aleksandr Polovtsev
> Assignee: Aleksandr Polovtsev
> Priority: Trivial
> Labels: ignite-3
>
> I've stumbled upon the following pattern in some places when working with
> CompletableFutures:
> {code:java}
> f.handle((v, e) -> {
> if (e != null) {
> // do something
> sneakyThrow(e);
> } else {
> return v;
> }
> });
> {code}
> This is wrong API usage, this pattern can be replaced with a simple
> `whenComplete` call.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)