Skip to content

Commit

Permalink
spotlessApply and private constructor for MathUtilities
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Atanasov <[email protected]>
  • Loading branch information
ata-nas committed Nov 11, 2024
1 parent 7fc51bb commit c93e3c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ public static boolean isPowerOfTwo(final int toCheck) {
// by short-circuiting the logical AND operation
return (0 < toCheck) && ((toCheck & (toCheck - 1)) == 0);
}

private MathUtilities() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public void testNotifierConfig_happyPath() {

@Test
public void testNotifierConfig_negativeRingBufferSize() {
IllegalArgumentException exception =
assertThrows(IllegalArgumentException.class, () -> new NotifierConfig(-1));
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> new NotifierConfig(-1));
assertEquals("Notifier Ring Buffer Size must be positive!", exception.getMessage());
}

Expand All @@ -50,9 +49,7 @@ public void testMediatorConfig_powerOf2Values() {
// Test the non-power of 2 values
for (int powerOf2Value : powerOf2Values) {
IllegalArgumentException exception =
assertThrows(
IllegalArgumentException.class,
() -> new NotifierConfig(powerOf2Value + 1));
assertThrows(IllegalArgumentException.class, () -> new NotifierConfig(powerOf2Value + 1));
assertEquals("Notifier Ring Buffer Size must be a power of 2!", exception.getMessage());
}
}
Expand Down

0 comments on commit c93e3c1

Please sign in to comment.