From 7d22c45636023d4b938c59f9b1a083ebe4ab1fd3 Mon Sep 17 00:00:00 2001 From: nishadi Date: Sat, 24 Feb 2018 18:33:38 +0530 Subject: [PATCH] CommentManagementAPIImpl --- .../device/application/mgt/core/impl/CommentsManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/CommentsManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/CommentsManagerImpl.java index 4a5ab8b1c9..68f519de7e 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/CommentsManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/CommentsManagerImpl.java @@ -56,11 +56,12 @@ public class CommentsManagerImpl implements CommentsManager { } @Override - public Comment addComment(Comment comment, String uuid, int tenantId) throws CommentManagementException { + public Comment addComment(Comment comment, String uuid) throws CommentManagementException { if (log.isDebugEnabled()) { log.debug("Request for comment is received for uuid" + uuid); } + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); comment.setCreatedAt(Timestamp.from(Instant.now())); try { ConnectionManagerUtil.beginDBTransaction();