summaryrefslogtreecommitdiffstats
path: root/datarouter-prov/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-prov/src/main/java/org')
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DB.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DB.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DB.java
index 1952f946..3e2436fa 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DB.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DB.java
@@ -123,16 +123,14 @@ public class DB {
if (++n >= 3) {
throw sqlEx;
}
- } finally {
- if (connection != null && !connection.isValid(1)) {
- connection.close();
- connection = null;
- }
}
} while (connection == null);
}
}
-
+ if (connection != null && !connection.isValid(1)) {
+ connection.close();
+ connection = null;
+ }
}
return connection;
}