Attila Doroszlai created HDDS-14189:
---------------------------------------

             Summary: 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


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