Inspectopedia Help

'serialVersionUID' field not declared 'private static final long'

Reports Serializable classes whose serialVersionUID field is not declared private static final long.


class SampleClass implements Serializable { private long serialVersionUID = 1; // field of a Serializable class is not declared 'private static final long' public SampleClass() { System.out.println(serialVersionUID); } }

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Java, 241.16690

Last modified: 29 April 2024