I've got a distributed system with a serializable enum class with constants that might vary across the system.
Because these classes may be different, valueOf could potentially be called upon deserialization on a constant that doesn't exist, throwing a runtime exception.
I don't believe valueOf can be overridden, or another method custom inserted before valueOf is called during deserialization.
Is there a way to avoid this problem with enums?