summaryrefslogtreecommitdiffstats
path: root/appc-common/src
diff options
context:
space:
mode:
authorvidhyasree <sn141y@att.com>2018-06-26 11:55:24 -0400
committerSantoshi Vidhyasree Nerella <sn141y@att.com>2018-06-26 19:04:33 +0000
commit902fc7abbb42e062ee4a08e84521c3e505fe012f (patch)
tree1f82164e7fb96f6cee28b2b76a438669e6c45486 /appc-common/src
parenta0e26d8b474fa91e6f4ec6bcbb2c53384821bd7a (diff)
Fix for invalid locking approach
Issue-ID: APPC-1019 Change-Id: I738c4ad72c29f494488a3fe3657243927797e2b5 Signed-off-by: vidhyasree <sn141y@att.com>
Diffstat (limited to 'appc-common/src')
-rw-r--r--appc-common/src/main/java/org/onap/appc/encryption/EncryptionTool.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/appc-common/src/main/java/org/onap/appc/encryption/EncryptionTool.java b/appc-common/src/main/java/org/onap/appc/encryption/EncryptionTool.java
index 480b15e06..37205fc75 100644
--- a/appc-common/src/main/java/org/onap/appc/encryption/EncryptionTool.java
+++ b/appc-common/src/main/java/org/onap/appc/encryption/EncryptionTool.java
@@ -108,13 +108,9 @@ public class EncryptionTool {
*
* @return The encryption tool to be used
*/
- public static final EncryptionTool getInstance() {
+ public static final synchronized EncryptionTool getInstance() {
if (instance == null) {
- synchronized (lock) {
- if (instance == null) {
- instance = new EncryptionTool();
- }
- }
+ instance = new EncryptionTool();
}
return instance;
}