..parser.ast.expression.arithmeic.ArithmeticSubtractExpression 代码错误
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
输入参数 long2 判断错误
``` java
@Override
public Number calculate(Long long1, Long long2) {
if (long1 == null || long1 == null)
return null;
...
}
```
[ArithmeticSubtractExpression.java#L68](https://github.com/alibaba/cobar/blob/master/server/src/main/parser/com/alibaba/cobar/parser/ast/expression/arithmeic/ArithmeticSubtractExpression.java#L68)
Contributor guide
Research direction
Open server/src/main/parser/com/alibaba/cobar/parser/ast/expression/arithmeic/ArithmeticSubtractExpression.java at line 68 and inspect the calculate method's null handling. Compare it with the surrounding arithmetic expression implementations and run the relevant parser or expression tests; the issue is done when null inputs are checked correctly without changing subtraction behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100