<AWT Dev> [14] Review Request: 8232226 [macos 10.15] test/jdk/java/awt/color/EqualityTest/EqualityTest.java may fail

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Oct 18 06:23:46 UTC 2019

Please review the fix for JDK 14.

Bug: https://bugs.openjdk.java.net/browse/JDK-8232226
Fix: http://cr.openjdk.java.net/~serb/8232226/webrev.00

This test creates a Color object on top of the SystemColor and checks
that the "equals()" will work properly for these two objects. But the test
uses Color(int RGB) constructor which skips the alpha channel of the
color. So the test fails if the SystemColor is transparent.

Actual change in the test is:
  - Color color = new Color(system.getRGB());
  + Color color = new Color(system.getRGB(), system.getAlpha() < 255);

But in the webrev it appears as a new test because it is moved from the closed repo.

Best regards, Sergey.

More information about the awt-dev mailing list