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

Attila Doroszlai updated HDDS-14189:
------------------------------------
    Status: Patch Available  (was: In Progress)

> Copy using OmKeyInfo.toBuilder instead of newBuilder
> ----------------------------------------------------
>
>                 Key: HDDS-14189
>                 URL: https://issues.apache.org/jira/browse/HDDS-14189
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Minor
>              Labels: pull-request-available
>
> Existing {{OmKeyInfo}} is sometimes copied with slightly different values 
> using {{OmKeyInfo.newBuilder}} and setting all individual properties.  Such 
> code could instead use {{toBuilder}} to initialize the builder with the 
> existing instance's values.
> Benefits:
> - less boilerplate code
> - less change if new property is added
> - avoid copying immutable collections



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to