Hi!!
I have implemented a Binary Search Tree which has a class Node in the package. The BST class has a method called, find, and its helper findNode. However, when I test the class with large data set, I'm getting StackOverFlowError, pointing at the findNode() method.

My understanding is that, this kind of error occurs when the Recursive calls is infinite.
private Node find(String word)
{
if(rootNode != null)
{
return findNode(rootNode, new Node(word));
}
return null;
}
//Helper method for find
private Node findNode(Node search, Node node)
{
if(search == null) //Base case
{
return null;
}
if(search.getData().equals(node.getData()))
{
return search;
}
else
{
Node returnNode = findNode(search.getLeft(), node);
if(returnNode == null)
{
returnNode = findNode(search.getRight(),node);
}
return returnNode;
}
}

I would very much appreciate if any body could help me see the problem!
Many Thanks