Fix for invalid locking approach
[appc.git] / appc-common / src / main / java / org / onap / appc / encryption / EncryptionTool.java
index 480b15e..37205fc 100644 (file)
@@ -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;
     }