When I serialize an object, I can use the serialVersionUID mechanism at the class level to ensure the compatibility of the two types.
However, what happens when I serialize fields of enum values? Is there a way to ensure that the enum type has not been manipulated between serialization and deserialization?
Suppose that I have an enum like OperationResult {SUCCESS, FAIL}, and a field called "result" in an object that is being serialized. How do I ensure, when the object is deserialized, that result is still correct even if someone maliciously reversed the two? (Suppose the enum is declared elsewhere as a static enum)
I am wondering out of curiosity - I use jar-level authentication to prevent manipulation.