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);