From: anushadasari Date: Wed, 6 Nov 2019 09:33:30 +0000 (+0530) Subject: Merge this if statement with the enclosing one X-Git-Tag: 2.2.0~10 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=520fdcf304cc2ea282859017b4a3ccf26ee5ae70;p=optf%2Fcmso.git Merge this if statement with the enclosing one Merging collapsible if statements increases the code's readability. Issue-ID: OPTFRA-634 Change-Id: Ic1c24c2671f62282477e32c432216ac560745c03 Signed-off-by: anushadasari --- diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java b/cmso-service/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java index 332ca73..0a7a69e 100755 --- a/cmso-service/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java @@ -66,11 +66,9 @@ public class AafAuthProvider implements AuthenticationProvider { sessionId = webAuthDetails.getRemoteAddress() + ":" + webAuthDetails.getSessionId(); } } - if (env.getProperty(AafProperties.aafEnabled.toString(), Boolean.class, true)) { - if (clientCache.authenticate(name, password, sessionId) != AuthorizationResult.Authenticated) { + if (env.getProperty(AafProperties.aafEnabled.toString(), Boolean.class, true) && clientCache.authenticate(name, password, sessionId) != AuthorizationResult.Authenticated ) { return null; } - } return new UsernamePasswordAuthenticationToken(name, password, new ArrayList<>()); }