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

[macosx] NotSerializableException during JFrame with MenuBar serialization

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 11
    • client-libs
    • None
    • minimal
    • Java API
    • SE

      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;

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

              Created:
              Updated:
              Resolved: