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

[macosx] CPlatformWindow.setWindowState throws RuntimeException, if windowState=ICONIFIED:MAXIMIZED_BOTH

XMLWordPrintable

    • b01
    • os_x

        FULL PRODUCT VERSION :
        JDK 7u45 b18

        ADDITIONAL OS VERSION INFORMATION :
        OS X

        A DESCRIPTION OF THE PROBLEM :
        The method "sun.lwawt.macosx.CPlatformWindow.setWindowState" throws "java.lang.RuntimeException", if the provided "windowState" parameter is the bitwise mask "Frame.ICONIFIED | Frame.MAXIMIZED_BOTH" on OS X platform. Since the exception is undocumented, a third party application passing such a state value is not ready to handle the exception.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Compile and run the attached test case "RuntimeExceptionOnSetExtendedState.java.zip".

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        Exception in thread "main" java.lang.RuntimeException: Unknown window state: 7
                at sun.lwawt.macosx.CPlatformWindow.setWindowState(CPlatformWindow.java:830)
                at sun.lwawt.LWWindowPeer.setState(LWWindowPeer.java:589)
                at java.awt.Frame.setExtendedState(Frame.java:753)
                at RuntimeExceptionOnSetExtendedState.main(RuntimeExceptionOnSetExtendedState.java:14)

              alitvinov Anton Litvinov (Inactive)
              alitvinov Anton Litvinov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: