Asscender LinkedList eliminar duplicados valoresJava

    public static void removeNextDuplicate(SinglyLinkedListNode node){
            
        if(node != null){
            if(node.next !=null && node.data == node.next.data){
                node.next = node.next.next;
            }
            else{
                node = node.next;
            }
            removeNextDuplicate(node);
        }
    }
Dr. iterations