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

[macosx] NotSerializableException during JFrame with MenuBar serialization

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 11
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Serialization issue of AWT components.

      Problem

      Objects of AccessibleAWTComponentHandler, AccessibleAWTFocusHandler and AccessibleContainerHandler classes are assigned to non-transient fields of serializable classes.

      Solution

      Mark the classes as Serializable.

      Specification

      -        protected class AccessibleAWTComponentHandler implements ComponentListener {
      +        protected class AccessibleAWTComponentHandler implements ComponentListener, Serializable {
      +            private static final long serialVersionUID = -1009684107426231869L;
      
      -        protected class AccessibleAWTFocusHandler implements FocusListener {
      +        protected class AccessibleAWTFocusHandler implements FocusListener, Serializable {
      +            private static final long serialVersionUID = 3150908257351582233L;
      
               protected class AccessibleContainerHandler
      -            implements ContainerListener {
      +            implements ContainerListener, Serializable {
      +                private static final long serialVersionUID = -480855353991814677L;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ssadetsky Semyon Sadetsky (Inactive)
              Reporter:
              ssadetsky Semyon Sadetsky (Inactive)
              Reviewed By:
              Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: