diff options
author | anushadasari <danush10@in.ibm.com> | 2019-11-12 12:39:52 +0530 |
---|---|---|
committer | anushadasari <danush10@in.ibm.com> | 2019-11-12 12:40:01 +0530 |
commit | 2f37b614d541fa4a3c4bfa36836fd9919a469250 (patch) | |
tree | 81be67fc6fe3ddf6541289dc1d202f5a453423f9 | |
parent | 04f519ef388b9e41b36a583b6f9507e11ec82338 (diff) |
Merge this if statement with the enclosing one
Merging collapsible if statements increases the code's readability.
Issue-ID: OPTFRA-634
Change-Id: Ib1a5e730820b832f5e1d42aefd75f925a2ad26cc
Signed-off-by: anushadasari <danush10@in.ibm.com>
-rwxr-xr-x | cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java index 96f2ef2..80accfe 100755 --- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java +++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java @@ -66,10 +66,8 @@ 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<>());
|