From 6db2cdea8f72331a30f81b0384dc4f82ac2d0229 Mon Sep 17 00:00:00 2001 From: zack Date: Mon, 14 Oct 2019 09:26:21 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-20318=20sonar=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/iscrollbar/UISBChooser.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UISBChooser.java b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UISBChooser.java index ebc311dfd3..c780eeb2d7 100644 --- a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UISBChooser.java +++ b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UISBChooser.java @@ -199,6 +199,7 @@ public class UISBChooser extends JDialog { twoColorField.setUpperColor(outColor); } + @SuppressWarnings("squid:S2164") public static Color getAdjustedColor(Color inColor, int sat, int bri) { Color briColor = inColor; @@ -220,9 +221,9 @@ public class UISBChooser extends JDialog { int dg = briColor.getGreen() - satColor.getGreen(); int db = briColor.getBlue() - satColor.getBlue(); - r = briColor.getRed() - (int) Math.round(dr * sat / VALUE * 1.0); - g = briColor.getGreen() - (int) Math.round(dg * sat / VALUE * 1.0); - b = briColor.getBlue() - (int) Math.round(db * sat / VALUE * 1.0); + r = briColor.getRed() - (int) Math.round(dr * sat / (VALUE * 1.0)); + g = briColor.getGreen() - (int) Math.round(dg * sat / (VALUE * 1.0)); + b = briColor.getBlue() - (int) Math.round(db * sat / (VALUE * 1.0)); } else { float d = ColorRoutines.getGreyValue(briColor); float dr = briColor.getRed() - d;