summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Shen <shentao@chinamobile.com>2019-08-15 04:20:40 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-15 04:20:40 +0000
commit24c4079a06562754e76d7ff0a44de09e2387d57c (patch)
tree0df08b273646ef42514b2747b39db6699792d943
parente964b96bcdafaf6bb6e86fb6036360dc6d5e5d9e (diff)
parent253ac5197db3f0fdd158454414a7a78138bb362f (diff)
Merge "Usecaseui server sonar critical issue fix."
-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+"";
}