It depends.
If you use different compilers to compile your source code several times, your compiled code may have different serializationIds parameters that violate serialization. Then you need to stick with constant serializationId explicitly in your code. It must be static, finite, and for each class (not inherited).
However, if you always compile your code with a specific compiler and always deploy your code in one shot to all your virtual machines, you probably need strict version checking and you want to make sure that at any time there is only one version of your code in this case you should just suppress the warning. Thus, if the virtual machine does not successfully deploy and the old version of your code is running, you probably expect exceptions during serialization, rather than fancy deserialized objects. This happens in my case, we had a very large cluster, and we need strict version checking to find out about any deployment problem.
In any case, perhaps you should avoid serialization when possible, since default serialization is very slow compared to protocol buffers or saving and does not support cross-language interactions.
Daniel Jun 08 2018-11-11T00: 00Z
source share