aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-service
diff options
context:
space:
mode:
authoranushadasari <danush10@in.ibm.com>2019-11-06 15:03:30 +0530
committerVikas Varma <vv8305@att.com>2020-01-22 15:28:28 +0000
commit520fdcf304cc2ea282859017b4a3ccf26ee5ae70 (patch)
tree514d43632cd00505e647ead38c169cd5d25b5eb0 /cmso-service
parentacf8bb31c508954f94d5ccc921b28300b2033f21 (diff)
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 <danush10@in.ibm.com>
Diffstat (limited to 'cmso-service')
-rwxr-xr-xcmso-service/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java4
1 files changed, 1 insertions, 3 deletions
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<>());
}