Inspectopedia
 
2024.3

Non-serializable object passed to 'ObjectOutputStream'

Warning
New
Last modified: 03 December 2024

Reports non-Serializable objects used as arguments to java.io.ObjectOutputStream.write(). Such calls will result in runtime exceptions.

This inspection assumes objects of the types java.util.Collection and java.util.Map to be Serializable, unless the types they are declared in are non-Serializable.

Example: