if (parent != null)
if (!isExpanded(parent) && parent != null)
  private void doExpandParents(TreePath path, boolean state)  {    TreePath parent = path.getParentPath();    if (isExpanded(parent))		{			nodeStates.put(path, state ? EXPANDED : COLLAPSED);      return;		}        if (parent != null)      doExpandParents(parent, false);    nodeStates.put(path, state ? EXPANDED : COLLAPSED);  }