Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160675

Issue lint warning for non-serializable non-transient instance fields in serializable type

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 9
    • tools
    • b21

      As an enhancement to javac's lint warnings about serialization (JDK-4767441), it would be informative if javac warned about the presence non-serializable non-transient instance fields in a serializable class. The types can lead to interesting instances of a type not being serializable in practice (JDK-6226715).

      Such a warning should be omitted if a class defines serialPersistentFields (see https://docs.oracle.com/javase/8/docs/platform/serialization/spec/serial-arch.html#a5251).

            darcy Joe Darcy
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: