diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2017-09-14 11:25:42 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2017-09-14 11:29:49 -0400 |
commit | e9b5f957f3c27c0a225d7b8fa16a220c5c98c746 (patch) | |
tree | fd5595b25aa491ad511fb8dee019aa8a24ec7f0d /integrity-audit/src | |
parent | 65dff31a2e34b14347f1c0311420463c367afd3d (diff) |
Logging exceptions to clear sonar critical
Just logging the exceptions anyway and remove e.printstack since
that goes to stdout/stderr.
Issue-ID: POLICY-195
Change-Id: I60616bd6ce633e2fcae266bb37eb735c6e6bb4c4
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'integrity-audit/src')
-rw-r--r-- | integrity-audit/src/main/java/org/onap/policy/common/ia/DbDAO.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/integrity-audit/src/main/java/org/onap/policy/common/ia/DbDAO.java b/integrity-audit/src/main/java/org/onap/policy/common/ia/DbDAO.java index b392b555..e1412094 100644 --- a/integrity-audit/src/main/java/org/onap/policy/common/ia/DbDAO.java +++ b/integrity-audit/src/main/java/org/onap/policy/common/ia/DbDAO.java @@ -237,9 +237,7 @@ public class DbDAO { } }catch(Exception e){ String msg = "getAllEntries encountered exception: " + e; - logger.error(msg); - System.out.println(new Date()); - e.printStackTrace(); + logger.error(msg, e); } em.close(); logger.debug("getAllEntries: Exit, resultMap, size=" + resultMap.size()); @@ -331,8 +329,6 @@ public class DbDAO { }catch (Exception e){ String msg = "DbDAO: " + "setLastUpdated() " + "ecountered a problem in execution: "; logger.error(msg + e); - System.out.println(new Date()); - e.printStackTrace(); throw new DbDaoTransactionException(e); } } @@ -362,8 +358,6 @@ public class DbDAO { }catch (Exception e){ String msg = "DbDAO: " + "getIntegrityAuditEntity() " + "ecountered a problem in execution: "; logger.error(msg + e); - System.out.println(new Date()); - e.printStackTrace(); throw new DbDaoTransactionException(e); } } @@ -711,8 +705,6 @@ public class DbDAO { String msg = "DbDAO: " + "changeDesignated() " + "caught Exception, message=" + e.getMessage(); logger.error(msg + e); - System.out.println(new Date()); - e.printStackTrace(); throw new DbDaoTransactionException(msg, e); } else { |