Skip to content

Commit 7eeb225

Browse files
resolved spotbugs
1 parent 781ec96 commit 7eeb225

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/test/java/com/thealgorithms/datastructures/trees/BinaryTreeTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ void test2() {
3939

4040
BinaryTree.Node root = t.getRoot();
4141
Assertions.assertNotNull(root, "Root should not be null after removals.");
42-
if (root != null) { // Additional null check for tool satisfaction
43-
Assertions.assertEquals(9, root.data);
44-
}
42+
// Removed redundant null check
43+
Assertions.assertEquals(9, root.data); // Check if new root is correct
4544
}
4645

4746
// Test for attempting to remove a nonexistent node

0 commit comments

Comments
 (0)