From 471e6e3b21e62e98c79950781644edbbe894b59a Mon Sep 17 00:00:00 2001 From: nishadi Date: Sat, 24 Feb 2018 18:37:47 +0530 Subject: [PATCH] CommentManagerImpl Variable values changed. --- .../application/mgt/core/impl/CommentsManagerImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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/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 68f519de7e..6f8b6a1fa6 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 @@ -141,7 +141,7 @@ public class CommentsManagerImpl implements CommentsManager { public Comment getComment(int commentId) throws CommentManagementException { PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); - Comment comment = null; + Comment comment; if (log.isDebugEnabled()) { log.debug("Comment retrieval request is received for the comment id " + commentId); } @@ -215,7 +215,7 @@ public class CommentsManagerImpl implements CommentsManager { @Override public int getRatedUser(String uuid) throws ApplicationManagementException { - int ratedUsers = 0; + int ratedUsers; if (log.isDebugEnabled()) { log.debug("Get the rated users for the application release number" + uuid); } @@ -234,7 +234,7 @@ public class CommentsManagerImpl implements CommentsManager { @Override public int getStars(String uuid) throws ApplicationManagementException { - int stars = 0; + int stars; if (log.isDebugEnabled()) { log.debug("Get the average of rated stars for the application " + uuid); } @@ -256,7 +256,7 @@ public class CommentsManagerImpl implements CommentsManager { if (log.isDebugEnabled()) { log.debug("Stars are received for the application " + uuid); } - int newStars = 0; + int newStars; try { ConnectionManagerUtil.beginDBTransaction(); int ratedUsers = commentDAO.getRatedUser(uuid);