Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过 MapEntryLite 获取枚举类型的Map.Key 返回 Integer #170

Open
kentkwan opened this issue Aug 13, 2021 · 1 comment
Open

通过 MapEntryLite 获取枚举类型的Map.Key 返回 Integer #170

kentkwan opened this issue Aug 13, 2021 · 1 comment

Comments

@kentkwan
Copy link

static T parseField(CodedInputStream input, ExtensionRegistryLite extensionRegistry, WireFormat.FieldType type,
T value) throws IOException
中对于枚举类型则直接返回枚举的value
是否可以改为
case ENUM:
return (T) value.getClass().getEnumConstants()[input.readEnum()];

@jhunters
Copy link
Owner

fixed at 2.4.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants