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

GraphicsDevice.setFullScreenWindow(null) throws NPE if there's a fullscreen window displayed

XMLWordPrintable

    • b77
    • generic
    • solaris

        The following JCK tests fail due to this issue:
        api/java_awt/GraphicsDevice/indexTGF.html#ShapeAndTranslucencyForFullScreen[nullShape]
        api/java_awt/Window/indexTGF.html#BackgroundGeneral[testNoAlphaFullScreen]
        api/java_awt/Window/indexTGF.html#ShapeGeneral[nullShapeForFullScreen]
        The following code causes NPE on Solaris.
        JDK: 7 build 74
        Platform: Solaris x86
        ------------------------------------------------------------------------------------------
        import java.awt.*;

        public class NPE {

            public static void main(String[] args) {
                GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
                devices[0].setFullScreenWindow(new Frame());
                devices[0].setFullScreenWindow(null);
            }
        }
        ------------------------------------------------------------------------------------------

        <db158260@zenit(pts/28).278> /set/java/re/j2se/7/promoted/latest/binaries/solaris-i586/bin/java NPE
        Exception in thread "main" java.lang.NullPointerException
                at sun.awt.X11GraphicsDevice.setDisplayMode(X11GraphicsDevice.java:388)
                at sun.awt.X11GraphicsDevice.setFullScreenWindow(X11GraphicsDevice.java:330)
                at NPE.main(NPE.java:10)

              dcherepanov Dmitry Cherepanov
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: