Add serialVersionUID to all classes that need it but doesn't have it
The serialVersionUID field is recommended for all Serializable classes. For example, exceptions and taglibs are serializable by inheritance but none of our classes declare the field. This is annoying since it shows up as lots of warnings in Eclipse. It is not a good idea to turn those warnings of, since this would also affect our classes used for web services. In those classes, it is important that we declare the serialVersionUID field, or the web services may not function correctly. So, the warnings are really a good thing, but not if only a few of them are important.
NOTE! It is easy to have Eclipse auto-generate the serialVersionUID field:
- Right click on the project
- Choose the Source -> Clean Up menu
- Switch off all options except the 'Add serial version Id' on the 'Missing code tab'. Use the 'Generated' option.
NOTE 2! The Clean up function has other useful functions, but we save those until some later time.