return false; } } else { Log.error("Error: object to remove is null"); return false; } } else { Log.error("Error: Passed list to remove from is null, no object to remove");
  protected boolean removeFromList ( Object what, List fromList, String listName ) {    if (fromList != null) {      if ( what != null) {        int index = fromList.indexOf(what);        if (index !=-1) {  //object to be removed is found in the list          fromList.remove(index);          return true;        }        else {  //cant find the object in the list          Log.warn("warn: can't find object in" + listName +                             ", ignoring remove");          return false;        }      }      else {  //object to remove is null        Log.error("Error: object to remove is null");        return false;      }    }    else {  //the list to remove from is null      Log.error("Error: Passed list to remove from is null, no object to remove");      return false;    }  }