You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2022/07/29 17:36:00 UTC

[jira] [Updated] (RATIS-1647) Fix DataStreamRequest

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

Tsz-wo Sze updated RATIS-1647:
------------------------------
    Summary: Fix DataStreamRequest  (was: Change DataStreamRequestByteBuffer.options to a List)

> Fix DataStreamRequest
> ---------------------
>
>                 Key: RATIS-1647
>                 URL: https://issues.apache.org/jira/browse/RATIS-1647
>             Project: Ratis
>          Issue Type: Sub-task
>          Components: Streaming
>            Reporter: Tsz-wo Sze
>            Priority: Major
>
> {code}
> // DataStreamRequestByteBuffer
>   private WriteOption[] options;
> {code}
> The options field above currently is an array so that it causes [EI_EXPOSE_REP|https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#ei-may-expose-internal-representation-by-returning-reference-to-mutable-object-ei-expose-rep].
> The problem is that the getWriteOptions() method below in DataStreamRequest returns an array.  We probably should deprecate it and add a new method to return a List.
> {code}
>   //DataStreamRequest
>   WriteOption[] getWriteOptions();
> {code}



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