From a7569456ce3e305bdd1f99474873e401af005738 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Wed, 14 Jun 2017 16:09:08 +0530 Subject: [PATCH] fixing the build issue due to removing the method in platform manager. --- .../application/mgt/core/impl/ApplicationManagerImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java index 14f86dfa708..45dcae7c97d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java @@ -18,6 +18,7 @@ */ package org.wso2.carbon.device.application.mgt.core.impl; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.application.mgt.common.*; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException; @@ -66,7 +67,8 @@ public class ApplicationManagerImpl implements ApplicationManager { application.setCurrentLifecycle(lifecycle); PlatformDAO platformDAO = DAOFactory.getPlatformDAO(); - Platform platform = platformDAO.getPlatformByIdentifier(application.getPlatform().getIdentifier()); + Platform platform = platformDAO.getPlatform(PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true), + application.getPlatform().getIdentifier()); if (platform == null) { throw new NotFoundException("Invalid platform"); } @@ -110,7 +112,7 @@ public class ApplicationManagerImpl implements ApplicationManager { ConnectionManagerUtil.openConnection(); ApplicationDAO applicationDAO = DAOFactory.getApplicationDAO(); return applicationDAO.getApplications(filter); - } finally { + } finally { ConnectionManagerUtil.closeConnection(); }