swingx
  1. swingx
  2. SWINGX-1531

MultiSplitLayout persistence is broken with Java 7

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.4
    • Fix Version/s: None
    • Component/s: SplitPane
    • Labels:
      None
    • Environment:

      Java 1.7.0_09

      Description

      Loading persisted layout results in exception:

      Exception in thread "AWT-EventQueue-0" org.jdesktop.swingx.MultiSplitLayout$InvalidLayoutException: Split must have > 2 children
      at org.jdesktop.swingx.MultiSplitLayout.throwInvalidLayout(MultiSplitLayout.java:1343)
      at org.jdesktop.swingx.MultiSplitLayout.checkLayout(MultiSplitLayout.java:1350)
      at org.jdesktop.swingx.MultiSplitLayout.layoutContainer(MultiSplitLayout.java:1391)
      at java.awt.Container.layout(Container.java:1503)
      at java.awt.Container.doLayout(Container.java:1492)
      at java.awt.Container.validateTree(Container.java:1688)
      at java.awt.Container.validateTree(Container.java:1697)
      at java.awt.Container.validateTree(Container.java:1697)
      at java.awt.Container.validateTree(Container.java:1697)
      at java.awt.Container.validateTree(Container.java:1697)
      at java.awt.Container.validate(Container.java:1623)
      at java.awt.Container.validateUnconditionally(Container.java:1660)
      at java.awt.Window.pack(Window.java:818)
      at SplitTest$1.run(SplitTest.java:68)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:682)
      at java.awt.EventQueue$3.run(EventQueue.java:680)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
      Exception in thread "AWT-EventQueue-0" org.jdesktop.swingx.MultiSplitLayout$InvalidLayoutException: Split must have > 2 children
      at org.jdesktop.swingx.MultiSplitLayout.throwInvalidLayout(MultiSplitLayout.java:1343)
      at org.jdesktop.swingx.MultiSplitLayout.checkLayout(MultiSplitLayout.java:1350)
      at org.jdesktop.swingx.MultiSplitLayout.layoutContainer(MultiSplitLayout.java:1391)
      at java.awt.Container.layout(Container.java:1503)
      at java.awt.Container.doLayout(Container.java:1492)
      at java.awt.Container.validateTree(Container.java:1688)
      at java.awt.Container.validateTree(Container.java:1697)
      at java.awt.Container.validateTree(Container.java:1697)
      at java.awt.Container.validateTree(Container.java:1697)
      at java.awt.Container.validateTree(Container.java:1697)
      at java.awt.Container.validate(Container.java:1623)
      at java.awt.Window.dispatchEventImpl(Window.java:2717)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:682)
      at java.awt.EventQueue$3.run(EventQueue.java:680)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      at java.awt.EventQueue$4.run(EventQueue.java:696)
      at java.awt.EventQueue$4.run(EventQueue.java:694)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)

        Activity

        Hide
        Karl Schaefer added a comment -

        Java 7 changed the format and mechanism of how the encoder and encoding work. As such, it is now required that you use a PersistenceDelegate when persisting the MultiSplitPane.Node.

        Show
        Karl Schaefer added a comment - Java 7 changed the format and mechanism of how the encoder and encoding work. As such, it is now required that you use a PersistenceDelegate when persisting the MultiSplitPane.Node.

          People

          • Assignee:
            Unassigned
            Reporter:
            rsmirnov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: