diff options
author | Ram Koya <rk541m@att.com> | 2018-09-27 18:05:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-09-27 18:05:58 +0000 |
commit | f499514699009bca5f7649725024a50a85204a04 (patch) | |
tree | 969bae4bb36b5d0b19703a7656b693765f01cc8d /datarouter-prov/src/main/java | |
parent | 85b8739b9f1ebdf9731b134ac2b2796c0e2e5178 (diff) | |
parent | 63e26495fca281bd9bd25780eeeb895e927367f3 (diff) |
Merge "BUG fix for DB connection"
Diffstat (limited to 'datarouter-prov/src/main/java')
-rw-r--r-- | datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DB.java | 10 |
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;
}
|