Handling deserialization of enums that no longer exist

Hey guys. I asked this question on StackOverflow and haven’t had much luck on there and thought I’d try here.

I have a file I’m trying to de-serialize that’s giving this error:

java.io.InvalidObjectException: enum constant ENUM_NAME does not exist in class

Normally for most classes you can just use readObject() and catch/fix the error before it happens. I.E. initialize a variable that didn’t exist in the old file or etc. How do you handle this with enums? I’d like to just basically return a null enum or check what the non-existent enum was and replace it with the correct one. I read online that java doesn’t handle enums like other classes when it comes to deserialization, so readObject() won’t work here, right?

Thanks in advance.