-
Notifications
You must be signed in to change notification settings - Fork 832
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
Is there any reason not to use names of enum? #321
Comments
Ordinals are smaller. We'd merge an Enum serializer that uses names, but it On Mon, Jun 22, 2015 at 2:54 PM, KwonNam Son [email protected]
|
@NathanSweet Don't we need a replaceDefaultSerializer then? |
Don't think so, EnumSerializer is lower priority than any default On Mon, Jun 22, 2015 at 6:02 PM, Martin Grotzke [email protected]
|
Ah, right. |
When I see EnumSerializer, it does not use enum's name. It uses ordinal.
This makes a problem when the order of enum constants changed
When the order changed, if it throws an exception, it's ok.
But if the deserialized ordinal exists in the new enum class, kryo does not throw any exception, just sets wrong enum value.
I made EnumStringSerializer by myself, and want to contribute to this project.
But Kryo's enum support has been very long time. I'm not sure whether you have specific reason not to use names for a long time.
Is there any reason not to use enum's name?
The text was updated successfully, but these errors were encountered: