/** * Removes the repo from this content source, if it exists. If it does exist, the mapping that was removed is * returned; if the given repo did not exist as one that this content source is a member of, <code>null</code> is * returned. * * @param repo the repo to remove from this content source * * @return the mapping that was removed or <code>null</code> if the repo was not mapped to this content source */ public RepoContentSource removeRepo(Repo repo) { if ((this.repoContentSources == null) || (repo == null)) { return null; } RepoContentSource doomed = null; for (RepoContentSource ccs : this.repoContentSources) { if (repo.equals(ccs.getRepoContentSourcePK().getRepo())) { doomed = ccs; repo.removeContentSource(this); break; } } if (doomed != null) { this.repoContentSources.remove(doomed); } return doomed; }