We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我们的自动化缺陷检测工具扫描 mdrill的源代码,发现了一个严重的bug:
路径:adhoc-internal/src/main/java/org/jfree/util/PaintUtilities.java
adhoc-internal/src/main/java/org/jfree/util/PaintUtilities.java
代码片段:
public static boolean equal(final Paint p1, final Paint p2) { ... if (p1 instanceof GradientPaint && p2 instanceof GradientPaint) { final GradientPaint gp1 = (GradientPaint) p1; final GradientPaint gp2 = (GradientPaint) p2; result = gp1.getColor1().equals(gp2.getColor1()) && gp1.getColor2().equals(gp2.getColor2()) && gp1.getPoint1().equals(gp2.getPoint1()) && gp1.getPoint2().equals(gp2.getPoint2()) && gp1.isCyclic() == gp2.isCyclic() && gp1.getTransparency() == gp1.getTransparency(); } ... }
上述代码片段中的if语句的 gp1.getTransparency() == gp1.getTransparency(); 恒为true, 建议修改为:
gp1.getTransparency() == gp1.getTransparency();
gp1.getTransparency() == gp2.getTransparency();
The text was updated successfully, but these errors were encountered:
使用 “==” 比较两个相同的表达式 (EqualToSameExpression) alibaba#90
acef2d3
Merge pull request #91 from waooog/master
8621180
fix bug: 使用 “==” 比较两个相同的表达式 (EqualToSameExpression) #90
No branches or pull requests
我们的自动化缺陷检测工具扫描 mdrill的源代码,发现了一个严重的bug:
路径:
adhoc-internal/src/main/java/org/jfree/util/PaintUtilities.java
代码片段:
上述代码片段中的if语句的
gp1.getTransparency() == gp1.getTransparency();
恒为true, 建议修改为:gp1.getTransparency() == gp2.getTransparency();
The text was updated successfully, but these errors were encountered: