Source:
protected ActionResult execute() { gateKeeper.verifyAdminPrivileges(account); AdminEmailComposePageData data = new AdminEmailComposePageData(account, sessionToken); String emailContent = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_CONTENT); String subject = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_SUBJECT); String addressReceiverListString = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_ADDRESS_RECEIVERS); String groupReceiverListFileKey = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_GROUP_RECEIVER_LIST_FILE_KEY); String emailId = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_ID); addressReceiver.add(addressReceiverListString); if (groupReceiverListFileKey != null && !groupReceiverListFileKey.isEmpty()) { groupReceiver.add(groupReceiverListFileKey); } boolean isNewDraft = emailId == null; if (isNewDraft) { createAndSaveNewDraft(subject, addressReceiver, groupReceiver, emailContent); } else { AdminEmailAttributes previousDraft = logic.getAdminEmailById(emailId); if (previousDraft == null) { createAndSaveNewDraft(subject, addressReceiver, groupReceiver, emailContent); } else { updatePreviousEmailDraft(previousDraft.getEmailId(), subject, addressReceiver, groupReceiver, emailContent); } } if (isError) { data.emailToEdit = AdminEmailAttributes .builder(subject, addressReceiver, groupReceiver, new Text(emailContent)) .withSendDate(null) .withEmailId(emailId) .build(); } else { statusToAdmin = Const.StatusMessages.EMAIL_DRAFT_SAVED + ": <br>" + "Subject: " + SanitizationHelper.sanitizeForHtml(subject); statusToUser.add(new StatusMessage(Const.StatusMessages.EMAIL_DRAFT_SAVED, StatusMessageColor.SUCCESS)); } return createShowPageResult(Const.ViewURIs.ADMIN_EMAIL, data); }

Target:
protected ActionResult execute() { gateKeeper.verifyAdminPrivileges(account); AdminEmailComposePageData data = new AdminEmailComposePageData(account, sessionToken); String emailContent = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_CONTENT); String subject = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_SUBJECT); String addressReceiverListString = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_ADDRESS_RECEIVERS); String groupReceiverListFileKey = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_GROUP_RECEIVER_LIST_FILE_KEY); String emailId = getRequestParamValue(Const.ParamsNames.ADMIN_EMAIL_ID); addressReceiver.add(addressReceiverListString); if (groupReceiverListFileKey != null && !groupReceiverListFileKey.isEmpty()) { groupReceiver.add(groupReceiverListFileKey); } boolean isNewDraft = emailId == null; if (isNewDraft) { createAndSaveNewDraft(subject, addressReceiver, groupReceiver, emailContent); } else { AdminEmailAttributes previousDraft = logic.getAdminEmailById(emailId); if (previousDraft == null) { createAndSaveNewDraft(subject, addressReceiver, groupReceiver, emailContent); } else { updatePreviousEmailDraft(previousDraft.getEmailId(), subject, addressReceiver, groupReceiver, emailContent); } } if (isError) { data.emailToEdit = AdminEmailAttributes .builder(subject, addressReceiver, groupReceiver, new Text(emailContent)) .withEmailId(emailId) .build(); } else { statusToAdmin = Const.StatusMessages.EMAIL_DRAFT_SAVED + ": <br>" + "Subject: " + SanitizationHelper.sanitizeForHtml(subject); statusToUser.add(new StatusMessage(Const.StatusMessages.EMAIL_DRAFT_SAVED, StatusMessageColor.SUCCESS)); } return createShowPageResult(Const.ViewURIs.ADMIN_EMAIL, data); }