mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
style: include SUA_SUSPICIOUS_UNINITIALIZED_ARRAY (#7285)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user