Skip to content

Refactor: Use specific type for enum values in protobuf runtime.#2718

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_900792436
Open

Refactor: Use specific type for enum values in protobuf runtime.#2718
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_900792436

Conversation

@copybara-service
Copy link
Copy Markdown

Refactor: Use specific type for enum values in protobuf runtime.

This change introduces a dedicated valueEnum field in CGPValue to store enum instances as JavaLangEnum<ComGoogleProtobufProtocolMessageEnum> * instead of the generic id. This improves type safety and clarity in handling enum values across the protobuf runtime, including descriptor handling, message serialization/deserialization, and map field comparisons.

This change introduces a dedicated `valueEnum` field in `CGPValue` to store enum instances as `JavaLangEnum<ComGoogleProtobufProtocolMessageEnum> *` instead of the generic `id`. This improves type safety and clarity in handling enum values across the protobuf runtime, including descriptor handling, message serialization/deserialization, and map field comparisons.

PiperOrigin-RevId: 900792436
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants