Populate List with data from Binary Search Tree inOrder
<p>I'm looking to store the values of a binary search tree in order in a List. 
I have a public method that calls the helper method, but when I print the list that's returned, i'm constantly getting an empty list...</p>

<pre><code>public List inOrderList(){
    return inOrderList(overallRoot);   //root value
}

private List inOrderList(SearchTreeNode root){
    List&lt;E&gt; list1 = new ArrayList&lt;E&gt;();    //new list (will be returned)
    if(root==null){
        return list1;     //returns empty list
    }
     //List is NOT empty, let's do this thing.
    else {
        //create a new list, that calls left method recursive on left node
        List&lt;E&gt; podo = inOrderList(root.left);
        //Here, I *believe* we've reached the bottom. Add every podo to list1   
        list1.addAll(podo);

        //do the same thing for the right tree
        List&lt;E&gt; dopo = inOrderList(root.right);
        list1.addAll(dopo);        
   }

    //return the list we just filled from our BST
    return list1;
}
</code></pre>

<p>I elected not to try and fill my list with data alone. I figured using <code>addAll</code> and storing everything that way would be a better choice. Given that this solution was not working, I attempted storing data as well.</p>

<pre><code>private List&lt;Integer&gt; inOrderList(IntTreeNode root){
    List&lt;Integer&gt; list1 = new ArrayList&lt;Integer&gt;();
    if(root==null){
        return list1;
    } else { 
        while(root!=null){
            List&lt;Integer&gt; podo = inOrderList(root.left);
            list1.add(root.data);
            List&lt;Integer&gt; dopo = inOrderList(root.right);
            list1.add(root.data);
        }
   
    }
    return list1;
}
   
</code></pre>

<p>I found that this at least filled the a list, however it simply inserted the root value twice and was done. I've been working on this for the last hour or so, and can't seem to come up with anything better, so I figured I'd turn to you guys.</p>

<p>Where am I going wrong/ how should I go about it?</p>