Skip to content

Commit 109df1f

Browse files
authored
style: include SUA_SUSPICIOUS_UNINITIALIZED_ARRAY (#7285)
1 parent 2d443a9 commit 109df1f

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

spotbugs-exclude.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@
9696
<Match>
9797
<Bug pattern="UCPM_USE_CHARACTER_PARAMETERIZED_METHOD" />
9898
</Match>
99-
<Match>
100-
<Bug pattern="SUA_SUSPICIOUS_UNINITIALIZED_ARRAY" />
101-
</Match>
10299
<Match>
103100
<Bug pattern="SPP_USE_MATH_CONSTANT" />
104101
</Match>

src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ public static class Location {
6666
}
6767
}
6868

69-
public Location[] createLocation(int numberValues) {
70-
return new Location[numberValues];
71-
}
72-
7369
public Location buildLocation(double x, double y) {
7470
return new Location(x, y);
7571
}

src/test/java/com/thealgorithms/divideandconquer/ClosestPairTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ public void testBuildLocation() {
1616
assertEquals(4.0, point.y);
1717
}
1818

19-
@Test
20-
public void testCreateLocation() {
21-
ClosestPair cp = new ClosestPair(5);
22-
ClosestPair.Location[] locations = cp.createLocation(5);
23-
assertNotNull(locations);
24-
assertEquals(5, locations.length);
25-
}
26-
2719
@Test
2820
public void testXPartition() {
2921
ClosestPair cp = new ClosestPair(5);

0 commit comments

Comments
 (0)