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

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
      None

      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

              Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: