According to the documentation,

A program may produce unpredictable results if it attempts to distinguish two references to equal values of a value-based class, whether directly via reference equality or indirectly via an appeal to synchronization, identity hashing, serialization...

This rule raises an issue when a Serializable class defines a non-transient, non-static field field whose type is a known serializable value-based class. Known serializable value-based classes are: all the classes in the java.time package except Clock; the date classes for alternate calendars: HijrahDate, JapaneseDate, MinguaDate, ThaiBuddhistDate.

Noncompliant Code Example

class MyClass implements Serializable {
  private HijrahDate date;  // Noncompliant; mark this transient
  // ...
}

Compliant Solution

class MyClass implements Serializable {
  private transient HijrahDate date;
  // ...
}

See