You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksandr Polovtcev (Jira)" <ji...@apache.org> on 2023/03/10 08:31:00 UTC

[jira] [Updated] (IGNITE-18997) Remove redundant future transformations from PartitionReplicaListener

     [ https://issues.apache.org/jira/browse/IGNITE-18997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksandr Polovtcev updated IGNITE-18997:
-----------------------------------------
    Description: 
PartitionReplicaListener has a following pattern in its code:

{code:java}
if (request instanceof ReplicaSafeTimeSyncRequest) {
     return processReplicaSafeTimeSyncRequest((ReplicaSafeTimeSyncRequest) request)
         .thenApply(Function.identity());
}
{code}

This {{thenApply(Function.identity())}} is only needed for code being able to compile. This makes little sense, as we can simply use generic wildcards and remove these transfomations.


  was:
PartitionReplicaListener has a following pattern in its code:

{code:java}
 if (request instanceof ReplicaSafeTimeSyncRequest) {
     return processReplicaSafeTimeSyncRequest((ReplicaSafeTimeSyncRequest) request)
         .thenApply(Function.identity());
}
{code}

This {{thenApply(Function.identity())}} is only needed for code being able to compile. This makes little sense, as we can simply use generic wildcards and remove these transfomations.



> Remove redundant future transformations from PartitionReplicaListener
> ---------------------------------------------------------------------
>
>                 Key: IGNITE-18997
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18997
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Aleksandr Polovtcev
>            Assignee: Aleksandr Polovtcev
>            Priority: Trivial
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> PartitionReplicaListener has a following pattern in its code:
> {code:java}
> if (request instanceof ReplicaSafeTimeSyncRequest) {
>      return processReplicaSafeTimeSyncRequest((ReplicaSafeTimeSyncRequest) request)
>          .thenApply(Function.identity());
> }
> {code}
> This {{thenApply(Function.identity())}} is only needed for code being able to compile. This makes little sense, as we can simply use generic wildcards and remove these transfomations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)