Inspectopedia Help

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

Reports non-Serializable classes that define readObject() or writeObject() methods. Such methods in that context normally indicate an error.


public class SampleClass { private void readObject(ObjectInputStream str) {} private void writeObject(ObjectOutputStream str) {} }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023