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.
1 parent f8b5bbc commit 324d03fCopy full SHA for 324d03f
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 x) {
+ public double divide(int numerator, int y) {
15
// 潜在 Bug 1: 除以零未处理
16
// 潜在 Bug 2: 返回 double,但参数是 int,可能导致精度问题(如果结果需要精确)
17
- return numerator / x;
+ return numerator / y;
18
}
19
20
public int multiply(int a, int b) {
0 commit comments