Skip to content

Commit 324d03f

Browse files
author
siquanlv
committed
ai review test
1 parent f8b5bbc commit 324d03f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/net/lvsq/jgossip/BuggyCalculator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
public class BuggyCalculator {
1212
private static final Logger logger = Logger.getLogger(BuggyCalculator.class.getName());
1313

14-
public double divide(int numerator, int x) {
14+
public double divide(int numerator, int y) {
1515
// 潜在 Bug 1: 除以零未处理
1616
// 潜在 Bug 2: 返回 double,但参数是 int,可能导致精度问题(如果结果需要精确)
17-
return numerator / x;
17+
return numerator / y;
1818
}
1919

2020
public int multiply(int a, int b) {

0 commit comments

Comments
 (0)