From 759a31e34ced7893723636f84cf9480ce0d7b810 Mon Sep 17 00:00:00 2001 From: vil02 <65706193+vil02@users.noreply.github.com> Date: Sat, 21 Feb 2026 14:34:47 +0100 Subject: [PATCH] style: include `SUA_SUSPICIOUS_UNINITIALIZED_ARRAY` --- spotbugs-exclude.xml | 3 --- .../com/thealgorithms/divideandconquer/ClosestPair.java | 4 ---- .../thealgorithms/divideandconquer/ClosestPairTest.java | 8 -------- 3 files changed, 15 deletions(-) diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml index 13d72334e594..8c42802520e3 100644 --- a/spotbugs-exclude.xml +++ b/spotbugs-exclude.xml @@ -96,9 +96,6 @@ - - - diff --git a/src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java b/src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java index 4c9c40c83174..323098a99887 100644 --- a/src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java +++ b/src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java @@ -66,10 +66,6 @@ public static class Location { } } - public Location[] createLocation(int numberValues) { - return new Location[numberValues]; - } - public Location buildLocation(double x, double y) { return new Location(x, y); } diff --git a/src/test/java/com/thealgorithms/divideandconquer/ClosestPairTest.java b/src/test/java/com/thealgorithms/divideandconquer/ClosestPairTest.java index 38784228d68e..b25fd796b112 100644 --- a/src/test/java/com/thealgorithms/divideandconquer/ClosestPairTest.java +++ b/src/test/java/com/thealgorithms/divideandconquer/ClosestPairTest.java @@ -16,14 +16,6 @@ public void testBuildLocation() { 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);