Above is a really stripped-down version of my code. Anyway, I used the above code to make serialized
Test objects and deserialize them.
Then, more recently, and unintentionally, I got rid of the int evaluationMode and now it looks like the following code.
By the way, the only difference between the above code and the below code is that
public int evaluationMode = 0;
becomes
// public int evaluationMode = 0;
After I compiled the code below, it could deserialize Test objects fine. But that is what I am wondering about. Basically I deleted a non-transient field in a class description (the class called NamedProblem), and the serialized objects of the class could still be deserialized fine without an Exception.
I've done that kind of thing before a few times by accident, and got Exceptions every time. But this time I don't get any Exception. It seems that the evaluationMode value which exists in the serialized file is just ignored, but it does not cause an Exception.
My guess is that the newer versions of
Java (this is Java 6) don't throw exceptions in this situation, even though older versions did. Is that right?