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

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

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 9
    • 18
    • tools
    • b21

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: