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