JDK-8325192 : Serialization spec: remove comments about static field limitations
  • Type: Bug
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-02-03
  • Updated: 2024-02-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Related Reports
Relates :  
Since JEP 395, it has been possible to declare static fields in inner classes. The serialization spec has stale discussion about how this is impossible, leading to some limitations on serializable inner classes.

For example, from 1.5:

Note: There is, however, a limitation to the use of this mechanism to specify serializable fields for inner classes. Inner classes can only contain final static fields that are initialized to constants or expressions built up from constants. Consequently, it is not possible to set serialPersistentFields for an inner class (though it is possible to set it for static member classes). For other restrictions pertaining to serialization of inner class instances, see section Section 1.10, "The Serializable Interface".

There's another note that talks about this in 1.10.
While here, a minor typo in 1.6: "The location of the superclasses data" (should be superclasses')