I have the following class signature and ClientEventSourc
implements Serializable
:
public class Grid extends ClientEventSource implements Focusable, FramingBlockWrapper,LIMSEditableField
Now FindBugs is listing this as dodgy :
Class is Serializable, but doesn't define serialVersionUID
This class implements the Serializable interface, but does not define a serialVersionUID field. A change as simple as adding a reference to a .class object will add synthetic fields to the class, which will unfortunately change the implicit serialVersionUID (e.g., adding a reference to String.class will generate a static field class$java$lang$String). Also, different source code to bytecode compilers may use different naming conventions for synthetic variables generated for references to class objects or inner classes. To ensure interoperability of Serializable across versions, consider adding an explicit serialVersionUID.
Can some explain what it means and what is the best possible way to fix this ?