Merge this if statement with the enclosing one 76/98276/1
authoranushadasari <danush10@in.ibm.com>
Tue, 12 Nov 2019 07:12:29 +0000 (12:42 +0530)
committeranushadasari <danush10@in.ibm.com>
Tue, 12 Nov 2019 07:12:36 +0000 (12:42 +0530)
Merging collapsible if statements increases the code's readability.

Issue-ID: OPTFRA-634
Change-Id: If8f306257cb92de244cdc929e09ba89bbda62e86
Signed-off-by: anushadasari <danush10@in.ibm.com>
cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java

index 0dc18db..1ce581a 100755 (executable)
@@ -138,14 +138,12 @@ public class AafClientCache {
                 cacheAge = now;\r
             }\r
             permissions = cache.get(getCacheKey(auth));\r
-            if (permissions == null) {\r
-                if (!auth.get("password").equals("")) {\r
+            if ((permissions == null) && (!auth.get("password").equals(""))) {\r
                     permissions = getPermissionsFromAaf(auth);\r
                     if (permissions != null) {\r
                         cache.put(getCacheKey(auth), permissions);\r
                     }\r
                 }\r
-            }\r
         }\r
         return permissions;\r
     }\r