style: include SUA_SUSPICIOUS_UNINITIALIZED_ARRAY (#7285)

This commit is contained in:
Piotr Idzik
2026-02-21 16:27:13 +01:00
committed by GitHub
parent 2d443a9991
commit 109df1f398
3 changed files with 0 additions and 15 deletions

View File

@@ -96,9 +96,6 @@
<Match>
<Bug pattern="UCPM_USE_CHARACTER_PARAMETERIZED_METHOD" />
</Match>
<Match>
<Bug pattern="SUA_SUSPICIOUS_UNINITIALIZED_ARRAY" />
</Match>
<Match>
<Bug pattern="SPP_USE_MATH_CONSTANT" />
</Match>

View File

@@ -66,10 +66,6 @@ public final class ClosestPair {
}
}
public Location[] createLocation(int numberValues) {
return new Location[numberValues];
}
public Location buildLocation(double x, double y) {
return new Location(x, y);
}

View File

@@ -16,14 +16,6 @@ public class ClosestPairTest {
assertEquals(4.0, point.y);
}
@Test
public void testCreateLocation() {
ClosestPair cp = new ClosestPair(5);
ClosestPair.Location[] locations = cp.createLocation(5);
assertNotNull(locations);
assertEquals(5, locations.length);
}
@Test
public void testXPartition() {
ClosestPair cp = new ClosestPair(5);