Open binbinCheng opened 1 year ago
We are glad that you are contributing by opening this issue.
Please make sure to include all the relevant context. We will be here shortly.
If you are interested in contributing to our website project, please let us know! You can check out our contributing guide on :point_right: How to Participate in Project Contribution.
WeChat Assistant | WeChat Public Account |
---|---|
Name | Description | Subscribe | Unsubscribe | Archive |
---|---|---|---|---|
dev@linkis.apache.org | community activity information | subscribe | unsubscribe | archive |
Sonar code scanning, problem repair
example:
1.Cast one of the operands of this multiplication operation to a "double".
solve: Multiply two long types, the return parameter should be long type(两个long类型相乘,返回参数应为long类型)
2.Remove this conditional structure or edit its code blocks so that they're not all the same.
solve: The code executed in if else is the same, meaningless code should be removed(if else中执行的代码是一样的,应该去掉无意义的代码)
3.This class overrides "equals()" and should therefore also override "hashCode()".
solve: rewrite hashCode()(重写hashCode())
5.A "NullPointerException" could be thrown; "res" is nullable here.
solve: Remove meaningless code and perform non-null check before execution(去除无意义代码且执行前应先做非空校验)
6.Correct one of the identical sub-expressions on both sides of operator "&&"
Repeat condition, remove repeat condition(条件重复,去除重复条件)
7.Remove this dangerous instance of double-checked locking.(删除这个危险的双重检查锁定实例。)
8.Use another way to initialize this instance.(使用另一种方式来初始化这个实例。)