I believe this is because the version is compiled with Java 1.4. I will get:
No. There were no enumerations in Java 1.4.1. They were introduced in 1.5. It seems that what happened was that what was serialized as String was subsequently changed to Enum.
Ideally, I would like to replace the enum with the string
Your proposed change simply cancels this.
and somehow fix the existing object.
You cannot fix an existing serialized object, but you can make the current class compatible with it by returning the source code or finding out what it should have been and declaring identical serialVersionUID.
source share