Skip to content

Commit d391ec8

Browse files
committed
style: include IM_BAD_CHECK_FOR_ODD
1 parent a81fb32 commit d391ec8

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

spotbugs-exclude.xml

-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@
6565
<Match>
6666
<Bug pattern="MS_EXPOSE_REP" />
6767
</Match>
68-
<Match>
69-
<Bug pattern="IM_BAD_CHECK_FOR_ODD" />
70-
</Match>
7168
<Match>
7269
<Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING" />
7370
</Match>

src/main/java/com/thealgorithms/maths/SimpsonIntegration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public double simpsonsMethod(int n, double h, double a) {
6363
if (i == 0 || i == data.size() - 1) {
6464
integralEvaluation += data.get(i);
6565
System.out.println("Multiply f(x" + i + ") by 1");
66-
} else if (i % 2 == 1) {
66+
} else if (i % 2 != 0) {
6767
integralEvaluation += (double) 4 * data.get(i);
6868
System.out.println("Multiply f(x" + i + ") by 4");
6969
} else {

0 commit comments

Comments
 (0)