Merge "Fix sonar issue in SqlResource.java"
diff --git a/sql-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/sql/SqlResource.java b/sql-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/sql/SqlResource.java
index 1c0a008..767fdac 100755
--- a/sql-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/sql/SqlResource.java
+++ b/sql-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/sql/SqlResource.java
@@ -455,14 +455,15 @@
LOG.warn("Cannot decrypt " + tableName + "." + colName);
}
} catch (Exception e) {
- if (results != null) {
+ LOG.error("Caught exception trying to decrypt " + tableName + "." + colName, e);
+ }finally {
+ if (results != null) {
try {
results.close();
- } catch (SQLException ignored) {
-
+ } catch (SQLException se) {
+ LOG.error("Caught exception trying to close ResultSet",se);
}
}
- LOG.error("Caught exception trying to decrypt " + tableName + "." + colName, e);
}
}
return (strValue);