Sonar Critical issue 35/57635/3
authorBharathS24 <BS00493532@techmahindra.com>
Fri, 27 Jul 2018 04:46:46 +0000 (10:16 +0530)
committerBharathS24 <BS00493532@techmahindra.com>
Fri, 27 Jul 2018 04:46:57 +0000 (10:16 +0530)
Either log or rethrow this exception

Sonar link : https://sonar.onap.org/issues?myIssues=true&open=AWSYoWCawGn37JfbvTzk&resolved=false
 

Location : src/main/java/org/onap/dcae/inventory/exceptions/mappers/DBIExceptionMapper.java:L62

Change-Id: Ic2c2e1736acdcd60514e582f62a2de765d717508
Issue-ID: DCAEGEN2-634
Signed-off-by: BharathS24 <BS00493532@techmahindra.com>
src/main/java/org/onap/dcae/inventory/exceptions/mappers/DBIExceptionMapper.java

index 965953f..3292d60 100644 (file)
@@ -60,7 +60,7 @@ public class DBIExceptionMapper<T extends DBIException> implements ExceptionMapp
             InventoryDAOManager.getInstance().initialize();
             clientMessage.append(" Connection has been successfully reset. Please try again.");
         } catch(Exception e) {
-            errorLogger.error(String.format("Failed to re-initialize database connection: %s", e.getMessage()));
+            errorLogger.error(String.format("Failed to re-initialize database connection: %s", e));
             clientMessage.append(" Connection reset attempt has failed. Please try again soon.");
         }