diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/ApplicationManagerImpl.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/ApplicationManagerImpl.java index 56567155edf..efb55e60cb2 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/ApplicationManagerImpl.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/ApplicationManagerImpl.java @@ -2619,8 +2619,11 @@ public class ApplicationManagerImpl implements ApplicationManager { int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); ApplicationDTO applicationDTO = getApplication(applicationId); - String sanitizedName = ApplicationManagementUtil.sanitizeName(applicationUpdateWrapper.getName(), - Constants.ApplicationProperties.NAME ); + String sanitizedName = ""; + if (!StringUtils.isEmpty(applicationUpdateWrapper.getName())) { + sanitizedName = ApplicationManagementUtil.sanitizeName(applicationUpdateWrapper.getName(), + Constants.ApplicationProperties.NAME ); + } try { ConnectionManagerUtil.beginDBTransaction(); if (!StringUtils.isEmpty(sanitizedName) && !applicationDTO.getName()