Inspectopedia Help

Serialization issues

'@Serial' annotation could be used  

Reports methods and fields in the Serializable and Externalizable classes that are suitable to be annotated with the java.

'@Serial' annotation used on wrong member  

Reports methods and fields in the Serializable and Externalizable classes that are not suitable to be annotated with the java.

'Comparator' class not declared 'Serializable'  

Reports classes that implement java.

'Externalizable' class without 'public' no-arg constructor  

Reports Externalizable classes without a public no-argument constructor.

'Serializable' object implicitly stores non-'Serializable' object  

Reports any references to local non-Serializable variables outside Serializable lambdas, local and anonymous classes.

'readObject()' or 'writeObject()' not declared 'private'  

Reports Serializable classes where the readObject or writeObject methods are not declared private.

'readResolve()' or 'writeReplace()' not declared 'protected'  

Reports classes that implement java.

'record' contains ignored members  

Reports serialization methods or fields defined in a record class.

'serialPersistentFields' field not declared 'private static final ObjectStreamField[]'  

Reports Serializable classes whose serialPersistentFields field is not declared as private static final ObjectStreamField[].

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

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

Externalizable class with 'readObject()' or 'writeObject()'  

Reports Externalizable classes that define readObject() or writeObject() methods.

Instance field may not be initialized by 'readObject()'  

Reports fields that are not guaranteed to be initialized after the object is deserialized by the readObject() method.

Non-serializable class with 'readObject()' or 'writeObject()'  

Reports non-Serializable classes that define readObject() or writeObject() methods.

Non-serializable class with 'serialVersionUID'  

Reports non-Serializable classes that define a serialVersionUID field.

Non-serializable field in a 'Serializable' class  

Reports non-serializable fields in classes that implement java.

Non-serializable object bound to 'HttpSession'  

Reports objects of classes not implementing java.

Non-serializable object passed to 'ObjectOutputStream'  

Reports non-Serializable objects used as arguments to java.

Serializable class with unconstructable ancestor  

Reports Serializable classes whose closest non-serializable ancestor doesn't have a no-argument constructor.

Serializable class without 'readObject()' and 'writeObject()'  

Reports Serializable classes that do not implement readObject() and writeObject() methods.

Serializable non-'static' inner class with non-Serializable outer class  

Reports non-static inner classes that implement Serializable and are declared inside a class that doesn't implement Serializable.

Serializable non-static inner class without 'serialVersionUID'  

Reports non-static inner classes that implement java.

Transient field in non-serializable class  

Reports transient fields in classes that do not implement java.

Transient field is not initialized on deserialization  

Reports transient fields that are initialized during normal object construction, but whose class does not have a readObject method.

Last modified: 29 April 2024