diff options
author | Paul Dennehy <paul.p.dennehy@ericsson.com> | 2018-09-27 15:54:08 +0100 |
---|---|---|
committer | Paul Dennehy <paul.p.dennehy@ericsson.com> | 2018-09-27 15:54:16 +0100 |
commit | 63e26495fca281bd9bd25780eeeb895e927367f3 (patch) | |
tree | 42843db818865eb16390efa13bed7a81107268c8 /datarouter-prov/src/main/java/org | |
parent | eb4080be2d6c5e2bf396e653f3fcd00f2747cce6 (diff) |
BUG fix for DB connection
Change-Id: I603c0405f5f086e190ac5132c6956065676aca1e
Signed-off-by: Paul Dennehy <paul.p.dennehy@ericsson.com>
Issue-ID: DMAAP-831
Diffstat (limited to 'datarouter-prov/src/main/java/org')
-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;
}
|