Remove the to_java() bit.  node.child_nodes is guaranteed to be a list of at least 0 size