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

[embedded] java.awt.GraphicsDevice.get/setDisplayMode behavior is incorrect when no display is present

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b65
    • CPU:
      x86
    • OS:
      linux, os_x, solaris

      Backports

        Description

        on linux when a display is not connected (read reported as connected by xrandr), a number of JCK tests that utilize java.awt.GraphicsDevice.get/setDisplayMode fail.

        The tests that fail are:

        api/java_awt/GraphicsDevice/indexTGF.html#General[getDisplayMode_nonNull]
        api/java_awt/GraphicsDevice/indexTGF.html#SetDisplayModeExceptions[IAE_nonExistingDisplayMode]
        api/java_awt/GraphicsDevice/indexTGF.html#SetDisplayModeExceptions[IAE_nullDisplayMode]
        api/java_awt/GraphicsDevice/indexTGF.html#SetGetFullScreenWindow[getSetWindow]
        api/java_awt/GraphicsDevice/indexTGF.html#SetGetFullScreenWindow[getSet_Null]
        api/java_awt/GraphicsDevice/indexTGF.html#SetGetFullScreenWindow[setFullScreenWindow_visibleAfterReturning]
        api/java_awt/SplashScreen/AnimatedContentTests.html#AnimatedContentTests[testAnimation]
        api/java_awt/SplashScreen/AnimatedContentTests.html#AnimatedContentTests[testDefaultPosition]
        api/java_awt/SplashScreen/AnimatedContentTests.html#AnimatedContentTests[testWindowBounds]
        api/java_awt/SplashScreen/AnimatedContentTests.html#AnimatedContentTests[testWindowSize]
        api/java_awt/SplashScreen/CreateGraphicsTestsOpq.html#CreateGraphicsTestsOpq[testDrawingOverSplashScreen]
        api/java_awt/SplashScreen/SetImageURLTestsImage.html#SetImageURLTestsImage[testWindowReposition]
        api/java_awt/SplashScreen/SetImageURLTestsImage.html#SetImageURLTestsImage[testWindowResize]
        api/java_awt/SplashScreen/SetImageURLTestsJar.html#SetImageURLTestsJar[testWindowReposition]
        api/java_awt/SplashScreen/SetImageURLTestsJar.html#SetImageURLTestsJar[testWindowResize]
        api/java_awt/SplashScreen/TransparencyTestsArgGIF.html#TransparencyTestsArgGIF[testTransparency]
        api/java_awt/SplashScreen/TransparencyTestsMnfPNG.html#TransparencyTestsMnfPNG[testTransparency]
        api/java_awt/SplashScreen/TransparentContentTestsArgGIF.html#TransparentContentTestsArgGIF[testDefaultPosition]
        api/java_awt/SplashScreen/TransparentContentTestsArgGIF.html#TransparentContentTestsArgGIF[testWindowBounds]
        api/java_awt/SplashScreen/TransparentContentTestsArgGIF.html#TransparentContentTestsArgGIF[testWindowSize]
        api/java_awt/SplashScreen/TransparentContentTestsMnfPNG.html#TransparentContentTestsMnfPNG[testDefaultPosition]
        api/java_awt/SplashScreen/TransparentContentTestsMnfPNG.html#TransparentContentTestsMnfPNG[testWindowBounds]
        api/java_awt/SplashScreen/TransparentContentTestsMnfPNG.html#TransparentContentTestsMnfPNG[testWindowSize]
        api/java_awt/Window/indexTGF.html#BackgroundGeneral[testNoAlphaFullScreen]
        api/java_awt/Window/indexTGF.html#ShapeExceptions[testICSEThrowing_fullScreen]
        api/java_awt/Window/indexTGF.html#ShapeGeneral[nullShapeForFullScreen]
        api/java_awt/GraphicsDevice/indexTGF.html#ShapeAndTranslucencyForFullScreen[nullShape]
        api/java_awt/GraphicsDevice/indexTGF.html#ShapeAndTranslucencyForFullScreen[opacityReset]
        api/java_awt/SplashScreen/SetImageURLTestsImage.html#SetImageURLTestsImage[testImage]
        api/java_awt/SplashScreen/SetImageURLTestsJar.html#SetImageURLTestsJar[testImage]
        api/java_awt/SplashScreen/StaticContentTestsArgGIF.html#StaticContentTestsArgGIF[testDefaultPosition]
        api/java_awt/SplashScreen/StaticContentTestsArgGIF.html#StaticContentTestsArgGIF[testWindowBounds]
        api/java_awt/SplashScreen/StaticContentTestsArgGIF.html#StaticContentTestsArgGIF[testWindowSize]
        api/java_awt/SplashScreen/StaticContentTestsArgJPG.html#StaticContentTestsArgJPG[testDefaultPosition]
        api/java_awt/SplashScreen/StaticContentTestsArgJPG.html#StaticContentTestsArgJPG[testWindowBounds]
        api/java_awt/SplashScreen/StaticContentTestsArgJPG.html#StaticContentTestsArgJPG[testWindowSize]
        api/java_awt/SplashScreen/StaticContentTestsArgPNG.html#StaticContentTestsArgPNG[testDefaultPosition]
        api/java_awt/SplashScreen/StaticContentTestsArgPNG.html#StaticContentTestsArgPNG[testWindowBounds]
        api/java_awt/SplashScreen/StaticContentTestsArgPNG.html#StaticContentTestsArgPNG[testWindowSize]
        api/java_awt/SplashScreen/StaticContentTestsMnfGIF.html#StaticContentTestsMnfGIF[testDefaultPosition]
        api/java_awt/SplashScreen/StaticContentTestsMnfGIF.html#StaticContentTestsMnfGIF[testWindowBounds]
        api/java_awt/SplashScreen/StaticContentTestsMnfGIF.html#StaticContentTestsMnfGIF[testWindowSize]
        api/java_awt/SplashScreen/StaticContentTestsMnfJPG.html#StaticContentTestsMnfJPG[testDefaultPosition]
        api/java_awt/SplashScreen/StaticContentTestsMnfJPG.html#StaticContentTestsMnfJPG[testWindowBounds]
        api/java_awt/SplashScreen/StaticContentTestsMnfJPG.html#StaticContentTestsMnfJPG[testWindowSize]
        api/java_awt/SplashScreen/StaticContentTestsMnfPNG.html#StaticContentTestsMnfPNG[testDefaultPosition]
        api/java_awt/SplashScreen/StaticContentTestsMnfPNG.html#StaticContentTestsMnfPNG[testWindowBounds]
        api/java_awt/SplashScreen/StaticContentTestsMnfPNG.html#StaticContentTestsMnfPNG[testWindowSize]
        api/java_awt/GraphicsDevice/indexTGF.html#SetFullScreenWindowExclusive[coversAllScreenDevice]
        api/java_awt/GraphicsDevice/indexTGF.html#SetFullScreenWindowExclusive[thereCouldBeOnlyOne]
        api/java_awt/SplashScreen/CreateGraphicsTestsTsp.html#CreateGraphicsTestsTsp[testDrawingOverSplashScreen]
        api/java_awt/SplashScreen/StaticContentTestsArgGIF.html#StaticContentTestsArgGIF[testImage]
        api/java_awt/SplashScreen/StaticContentTestsArgJPG.html#StaticContentTestsArgJPG[testImage]
        api/java_awt/SplashScreen/StaticContentTestsArgPNG.html#StaticContentTestsArgPNG[testImage]
        api/java_awt/SplashScreen/StaticContentTestsMnfGIF.html#StaticContentTestsMnfGIF[testImage]
        api/java_awt/SplashScreen/StaticContentTestsMnfJPG.html#StaticContentTestsMnfJPG[testImage]
        api/java_awt/SplashScreen/StaticContentTestsMnfPNG.html#StaticContentTestsMnfPNG[testImage]
        api/java_awt/SplashScreen/index.html#PrecedenceTest[testImageIsCorrect]

        the reason for the failure is that GraphicsDevice.getDisplayMode() returns null in such case, and GraphicsDevice.setDisplayMode() throws NPE.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  prr Philip Race
                  Reporter:
                  avoytilo Aleksey Voytilov (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: