You only provide half the code. Where's the code that calls deleteNode()?
posted 4 years ago
I think you have bigger problems than just what calls deleteNode().
Your methods assume things about the nodes being passed in as parameters that I don't think are reasonable. Who's to say that the node being deleted has a previousNode? What are those statics in StrTree for? Is there really only one of those items in your system?
I would start by separating the concept of "tree" from the concept of "node" and go from there. What are you trying to do overall?