Details
-
Bug
-
Resolution: Fixed
-
P4
-
23, 24
-
b12
-
generic
-
linux_oracle
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8340086 | 21.0.6-oracle | Trupti Patil | P4 | Resolved | Fixed | master |
JDK-8340175 | 17.0.14-oracle | Trupti Patil | P4 | Resolved | Fixed | master |
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.
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
- backported by
-
JDK-8340086 java/awt/Frame/MaximizeUndecoratedTest.java fails in OEL due to a slight color difference
- Resolved
-
JDK-8340175 java/awt/Frame/MaximizeUndecoratedTest.java fails in OEL due to a slight color difference
- Resolved
- relates to
-
JDK-8328753 Open source few Undecorated Frame tests
- Resolved
- links to
-
Commit(master) openjdk/jdk/15b20cb1
-
Review(master) openjdk/jdk/20486