aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsaac Manuel Raj <isaac.manuelraj@huawei.com>2019-08-09 17:15:13 +0530
committerIsaac Manuel Raj <isaac.manuelraj@huawei.com>2019-08-09 17:15:13 +0530
commit253ac5197db3f0fdd158454414a7a78138bb362f (patch)
tree53ad4bb3b355bcf8ffe8e91f2918ce6241e163e5
parent0ca2b4ccdcdd3c7801ecb4a2fb12cfe31b936f9b (diff)
Usecaseui server sonar critical issue fix.
Usecase ui code was not having logger to capture the exception trace. The same is fixed. Issue-ID: USECASEUI-304 Signed-off-by: Isaac Manuel Raj <isaac.manuelraj@huawei.com> Change-Id: I4631e5403c6bcc4bf7bb23ad18a011b856d89556
-rwxr-xr-xserver/src/main/java/org/onap/usecaseui/server/service/impl/PerformanceInformationServiceImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/impl/PerformanceInformationServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/impl/PerformanceInformationServiceImpl.java
index 64ab23f4..e2bc3d43 100755
--- a/server/src/main/java/org/onap/usecaseui/server/service/impl/PerformanceInformationServiceImpl.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/impl/PerformanceInformationServiceImpl.java
@@ -25,6 +25,7 @@ import java.util.Map;
import javax.transaction.Transactional;
+import com.google.common.base.Throwables;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
@@ -99,7 +100,7 @@ public class PerformanceInformationServiceImpl implements PerformanceInformation
list = query.setParameterList("alist", id).list();
return list;
} catch (Exception e) {
- e.printStackTrace();
+ logger.error("exception occurred while performing PerformanceInformationServiceImpl queryId. Details:" + Throwables.getStackTraceAsString(e));
logger.error("exception occurred while performing PerformanceInformationServiceImpl queryId. Details:" + e.getMessage());
return null;
}
@@ -206,7 +207,7 @@ public class PerformanceInformationServiceImpl implements PerformanceInformation
String num=(String) query.uniqueResult();
return UuiCommonUtil.isNotNullOrEmpty(num)?num:0+"";
} catch (Exception e) {
- e.printStackTrace();
+ logger.error("exception occurred while performing PerformanceInformationServiceImpl queryMaxValueByBetweenDate. Details:" + Throwables.getStackTraceAsString(e));
logger.error("exception occurred while performing PerformanceInformationServiceImpl queryMaxValueByBetweenDate. Details:" + e.getMessage());
return 0+"";
}