We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4e61d8e + 6fcafaa commit 5099251Copy full SHA for 5099251
src/test/java/net/lvsq/jgossip/BuggyCalculator.java
@@ -11,10 +11,10 @@
11
public class BuggyCalculator {
12
private static final Logger logger = Logger.getLogger(BuggyCalculator.class.getName());
13
14
- public double divide(int numerator, int a) {
+ public double divide(int numerator, int b) {
15
// 潜在 Bug 1: 除以零未处理
16
// 潜在 Bug 2: 返回 double,但参数是 int,可能导致精度问题(如果结果需要精确)
17
- return numerator / a;
+ return numerator / b;
18
}
19
20
public int multiply(int a, int c) {
0 commit comments