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

java/awt/Frame/MaximizeUndecoratedTest.java fails in OEL due to a slight color difference

    XMLWordPrintable

Details

    • b12
    • generic
    • linux_oracle

    Backports

      Description

        java/awt/Frame/MaximizeUndecoratedTest.java fails in OEL due to a slight color difference in the background color. This is currently reproduced only for Oracle Linux. Logs are attached.

        The Color object I'm getting for each of these Point objects:
        new Point(maxBounds.x + OFFSET, maxBounds.y + OFFSET) --> java.awt.Color[r=0,g=255,b=0]
         new Point(maxBounds.width - OFFSET, maxBounds.y + OFFSET) --> java.awt.Color[r=0,g=207,b=0]
         new Point(maxBounds.width - OFFSET, maxBounds.height - OFFSET) --> java.awt.Color[r=0,g=255,b=0]
         new Point(maxBounds.x + OFFSET, maxBounds.height - OFFSET) --> java.awt.Color[r=0,g=255,b=0]
         
        So, the issue occurs for the second Point object --> new Point(maxBounds.width - OFFSET, maxBounds.y + OFFSET) - java.awt.Color[r=0,g=207,b=0]


        Fix:
        When the offset is increased from 2 to 5, it works fine in all the platforms.

        This test verifies whether the frame is maximised or not by checking its four border points(by comparing it's colour with GREEN). But in OEL, the top left and top right borders are curved, so there is a possibility of error if we directly compare those points with GREEN colour, that's why an OFFSET is needed. But an OFFSET of 2 is not sufficient for OEL, and for safety I will change it to 5. I don't see this issue in Ubuntu as the borders as rectangular there, but not curved.

        Attachments

          Issue Links

            Activity

              People

                mvs Manukumar V S
                mvs Manukumar V S
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: