Source:
public void run() throws Failure { final Project project = projectControl.getProject(); final String projectName = project.getName(); if (projectName.endsWith(AllProjectsNameProvider.DEFAULT)) { throw new UnloggedFailure("Perhaps you meant to rm -fR " + site.site_path); } try { databaseDeleteHandler.assertCanDelete(project); } catch (CannotDeleteProjectException e) { throw new UnloggedFailure("Cannot delete project " + projectName + ": " + e.getMessage()); } if (!yesReallyDelete) { StringBuilder msgBuilder = new StringBuilder(); msgBuilder.append("Really delete "); msgBuilder.append(projectName); msgBuilder.append("?\n"); msgBuilder.append("This is an operation which permanently deletes "); msgBuilder.append("data. This cannot be undone!\n"); msgBuilder.append("If you are sure you wish to delete this project, "); msgBuilder.append("re-run\n"); msgBuilder.append("with the --yes-really-delete flag.\n"); die(msgBuilder.toString()); } if (!force) { Collection<String> warnings = null; try { warnings = databaseDeleteHandler.getWarnings(project); } catch (OrmException e) { die(e); } if (warnings != null && !warnings.isEmpty()) { StringBuilder msgBuilder = new StringBuilder(); msgBuilder.append("There are warnings against deleting "); msgBuilder.append(projectName); msgBuilder.append(":\n"); for (String warning: warnings) { msgBuilder.append(" * "); msgBuilder.append(warning); msgBuilder.append("\n"); } msgBuilder.append("To really delete "); msgBuilder.append(projectName); msgBuilder.append(", re-run with the --force flag."); die(msgBuilder.toString()); } } try { databaseDeleteHandler.delete(project); filesystemDeleteHandler.delete(project, preserveGitRepository); cacheDeleteHandler.delete(project); } catch (OrmException e) { die(e); } catch (RepositoryNotFoundException e) { die(e); } catch (IOException e) { die(e); } }

Target:
public void run() throws Failure { final Project project = projectControl.getProject(); final String projectName = project.getName(); if (projectName.endsWith(AllProjectsNameProvider.DEFAULT)) { throw new UnloggedFailure("Perhaps you meant to rm -fR " + site.site_path); } try { databaseDeleteHandler.assertCanDelete(project); } catch (CannotDeleteProjectException e) { throw new UnloggedFailure("Cannot delete project " + projectName + ": " + e.getMessage()); } catch (OrmException e) { die(e); } if (!yesReallyDelete) { StringBuilder msgBuilder = new StringBuilder(); msgBuilder.append("Really delete "); msgBuilder.append(projectName); msgBuilder.append("?\n"); msgBuilder.append("This is an operation which permanently deletes "); msgBuilder.append("data. This cannot be undone!\n"); msgBuilder.append("If you are sure you wish to delete this project, "); msgBuilder.append("re-run\n"); msgBuilder.append("with the --yes-really-delete flag.\n"); throw new UnloggedFailure(msgBuilder.toString()); } if (!force) { Collection<String> warnings = null; try { warnings = databaseDeleteHandler.getWarnings(project); } catch (OrmException e) { die(e); } if (warnings != null && !warnings.isEmpty()) { StringBuilder msgBuilder = new StringBuilder(); msgBuilder.append("There are warnings against deleting "); msgBuilder.append(projectName); msgBuilder.append(":\n"); for (String warning: warnings) { msgBuilder.append(" * "); msgBuilder.append(warning); msgBuilder.append("\n"); } msgBuilder.append("To really delete "); msgBuilder.append(projectName); msgBuilder.append(", re-run with the --force flag."); throw new UnloggedFailure(msgBuilder.toString()); } } try { databaseDeleteHandler.delete(project); filesystemDeleteHandler.delete(project, preserveGitRepository); cacheDeleteHandler.delete(project); } catch (OrmException e) { die(e); } catch (RepositoryNotFoundException e) { die(e); } catch (IOException e) { die(e); } }