src/java.desktop/share/classes/java/awt/Container.java

Print this page

        

@@ -3694,11 +3694,11 @@
      * @see #readObject(ObjectInputStream)
      */
     private void writeObject(ObjectOutputStream s) throws IOException {
         ObjectOutputStream.PutField f = s.putFields();
         f.put("ncomponents", component.size());
-        f.put("component", getComponentsSync());
+        f.put("component", component.toArray(EMPTY_ARRAY));
         f.put("layoutMgr", layoutMgr);
         f.put("dispatcher", dispatcher);
         f.put("maxSize", maxSize);
         f.put("focusCycleRoot", focusCycleRoot);
         f.put("containerSerializedDataVersion", containerSerializedDataVersion);