IntelliJ IDEA generating serialVersionUID
How do generate this value in IntelliJ IDEA?
I go to Settings -> Errors -> Serialization issues -> Serializable class without ‘serialVersionUID’, but it still doesn't show me the warning. My class PKladrBuilding parent implements interface Serializable.
Part of the code:
public class PKladrBuilding extends PRQObject
public abstract class PRQObject extends PObject
public abstract class PObject implements Serializable
I am not sure if you have an old version of IntelliJ IDEA, but if I go to menu File → Settings... → Inspections → Serialization issues → Serializable class without 'serialVersionUID'` enabled, the class you provide give me warnings.
If I try the first class I see:
BTW: It didn't show me a warning until I added { }
to the end of each class to fix the compile error.
Install the GenerateSerialVersionUID plugin by Olivier Descout.
Go to: menu File → Settings → Plugins → Browse repositories → GenerateSerialVersionUID
Install the plugin and restart.
Now you can generate the id from menu Code → Generate → serialVersionUID` or the shortcut.