You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2025/11/16 16:01:00 UTC
[jira] [Resolved] (HDDS-13938) Extract builderFromProtobuf methods
[ https://issues.apache.org/jira/browse/HDDS-13938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Attila Doroszlai resolved HDDS-13938.
-------------------------------------
Fix Version/s: 2.2.0
Resolution: Implemented
> Extract builderFromProtobuf methods
> -----------------------------------
>
> Key: HDDS-13938
> URL: https://issues.apache.org/jira/browse/HDDS-13938
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Attila Doroszlai
> Assignee: Huang Guan Hao
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.2.0
>
>
> OM value classes like {{OmVolumeArgs}}, {{OmBucketInfo}}, etc. have conversion function {{getFromProtobuf}}, which creates a value object using its {{Builder}}. The goal of this task is to extract a new function in each class that returns the {{Builder}} object after setting all properties, just before {{.build()}}. Existing {{getFromProtobuf}} methods should delegate to the new method like:
> {code}
> public static OmBucketInfo getFromProtobuf(BucketInfo bucketInfo) {
> return builderFromProtobuf(bucketInfo).build();
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org