ArrayList childList = childStruct.findAllChildHrefObjects(); if (childList.size() > 0) list.add(childList); }
if (childStruct != null) { ArrayList childList = childStruct.findAllChildHrefObjects(); if (childList != null && childList.size() > 0) { Iterator childIter = childList.iterator(); while (childIter.hasNext()) list.add(childIter.next()); } } }
  protected ArrayList findAllChildHrefObjects () {     ArrayList list = new ArrayList();     if (this instanceof Structure) {        List arrayList = ((Structure) this).getArrayList();        synchronized (arrayList) {           Iterator iter = arrayList.iterator(); // Must be in synchronized block           while (iter.hasNext()) {               Array childArray = (Array) iter.next();               Href hrefObj = childArray.getDataCube().getHref();               if (hrefObj != null)                   list.add(hrefObj);           }        } // sychronized arrayList         List structList = ((Structure) this).getStructList();        synchronized (structList) {           Iterator iter = structList.iterator(); // Must be in synchronized block           while (iter.hasNext()) {               Structure childStruct = (Structure) iter.next();               ArrayList childList = childStruct.findAllChildHrefObjects();               if (childList.size() > 0)                  list.add(childList);           }        } // sychronized structList      }     return list;  }