From a5caffd4a5dfac44a925f783bc1f72e0a7b85869 Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Tue, 24 May 2022 04:32:55 +0000 Subject: [PATCH] 8286786: [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java still fails Reviewed-by: serb, dnguyen --- .../8146321/JInternalFrameIconTest.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/jdk/javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java b/test/jdk/javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java index fc1ddc81c3b..083b9050190 100644 --- a/test/jdk/javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java +++ b/test/jdk/javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java @@ -268,14 +268,12 @@ public class JInternalFrameIconTest { int red2 = (color2 >> 16) & 0x000000FF; int green2 = (color2 >> 8) & 0x000000FF; int blue2 = (color2) & 0x000000FF; - if (red1 != red2 || green1 != green2 || blue1 != blue2) { - ++mismatchCounter; - if ((Math.abs(red1 - red2) > colorTolerance) - || (Math.abs(green1 - green2) > colorTolerance) - || (Math.abs(blue1 - blue2) > colorTolerance)) { + if ((Math.abs(red1 - red2) > colorTolerance) + || (Math.abs(green1 - green2) > colorTolerance) + || (Math.abs(blue1 - blue2) > colorTolerance)) { - flag = false; - } + ++mismatchCounter; + flag = false; } } }