Inspectopedia
 
2024.3

'record' contains ignored members

Warning
New
Last modified: 03 December 2024

Reports serialization methods or fields defined in a record class. Serialization methods include writeObject(), readObject(), readObjectNoData(), writeExternal(), and readExternal() and the field serialPersistentFields. These members are not used for the serialization or deserialization of records and therefore unnecessary.

Examples:

This inspection depends on the Java feature 'Records', which is available since Java 16.

New in 2020.3