[
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)