Skip to content

Commit fd840dd

Browse files
committed
fix: remove redundant null check for SpotBugs compliance
1 parent 75e7657 commit fd840dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/thealgorithms/datastructures/trees/ThreadedBinaryTree.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public void insert(int value) {
5959

6060
Node current = root;
6161
Node parent = null;
62-
while (current != null) {
62+
63+
while (true) {
6364
parent = current;
6465
if (value < current.value) {
6566
if (!current.leftIsThread && current.left != null) {

0 commit comments

Comments
 (0)