You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enum values are serialized with toString and deserialized using valueOf. ValueOf is generated by the compiler and will only except the name of the enum. This leads to problems when a custom toString for the enum is used since it is not possible to override the valueOf method to handle the matching case.
It would be better to serialize using the enum name method, then deserialize using valueOf. These two methods cannot be overriden so it will prevent any problems with adding custom toString methods to an enum.
The text was updated successfully, but these errors were encountered:
Enum values are serialized with toString and deserialized using valueOf. ValueOf is generated by the compiler and will only except the name of the enum. This leads to problems when a custom toString for the enum is used since it is not possible to override the valueOf method to handle the matching case.
It would be better to serialize using the enum name method, then deserialize using valueOf. These two methods cannot be overriden so it will prevent any problems with adding custom toString methods to an enum.
The text was updated successfully, but these errors were encountered: