diff --git a/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v2/src/main/java/org/wso2/carbon/identity/rest/api/server/email/template/v2/core/ServerEmailTemplatesService.java b/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v2/src/main/java/org/wso2/carbon/identity/rest/api/server/email/template/v2/core/ServerEmailTemplatesService.java index f4eccd83cf..296628f99c 100644 --- a/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v2/src/main/java/org/wso2/carbon/identity/rest/api/server/email/template/v2/core/ServerEmailTemplatesService.java +++ b/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v2/src/main/java/org/wso2/carbon/identity/rest/api/server/email/template/v2/core/ServerEmailTemplatesService.java @@ -38,9 +38,7 @@ import org.wso2.carbon.identity.rest.api.server.email.template.v2.model.SimpleEmailTemplate; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import javax.ws.rs.core.Response; import static org.wso2.carbon.identity.api.server.common.Constants.V2_API_PATH_COMPONENT; @@ -394,32 +392,6 @@ private List buildSimpleEmailTemplatesList(List buildEmailTemplateTypeWithoutTemplatesList( - List emailTemplateTypes) { - - Map templateTypeMap = new HashMap<>(); - for (String templateType : emailTemplateTypes) { - - EmailTemplateTypeWithID emailTemplateType = new EmailTemplateTypeWithID(); - // Set display name. - emailTemplateType.setDisplayName(templateType); - // Set id. - String templateTypeId = getEmailTemplateIdFromDisplayName(templateType); - emailTemplateType.setId(templateTypeId); - // Set location. - emailTemplateType.setSelf(getTemplateTypeLocation(templateTypeId)); - templateTypeMap.put(templateType, emailTemplateType); - } - - return new ArrayList<>(templateTypeMap.values()); - } - /** * Convert an internal email template to a new Email Template object. */