[
https://issues.apache.org/jira/browse/HDDS-10967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nandakumar updated HDDS-10967:
------------------------------
Description:
{{ContainerProtos.Type}} is not initialized in a for loop with an id of type
int when initializing {{{}ContainerProtos.Type{}}}.
for (int i = 0; i < numEnumEntries; i++) {
//...ContainerProtos.Type.forNumber(i + 1) //... }
This initialization relies on the fact that the proto ids of the
{{ContainerProtos.Type}} must be consecutive
> Do Not Depend on Contiguous IDs for Proto Enum Initialization
> -------------------------------------------------------------
>
> Key: HDDS-10967
> URL: https://issues.apache.org/jira/browse/HDDS-10967
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: ChenXi
> Assignee: ChenXi
> Priority: Major
> Labels: pull-request-available
>
> {{ContainerProtos.Type}} is not initialized in a for loop with an id of type
> int when initializing {{{}ContainerProtos.Type{}}}.
> for (int i = 0; i < numEnumEntries; i++) {
> //...ContainerProtos.Type.forNumber(i + 1) //... }
>
> This initialization relies on the fact that the proto ids of the
> {{ContainerProtos.Type}} must be consecutive
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]