aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-topology
diff options
context:
space:
mode:
Diffstat (limited to 'cmso-topology')
-rw-r--r--cmso-topology/src/main/java/org/onap/observations/MessageHeaders.java4
-rwxr-xr-xcmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java2
-rwxr-xr-xcmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java9
3 files changed, 6 insertions, 9 deletions
diff --git a/cmso-topology/src/main/java/org/onap/observations/MessageHeaders.java b/cmso-topology/src/main/java/org/onap/observations/MessageHeaders.java
index ccb7e56..6fc579e 100644
--- a/cmso-topology/src/main/java/org/onap/observations/MessageHeaders.java
+++ b/cmso-topology/src/main/java/org/onap/observations/MessageHeaders.java
@@ -65,7 +65,7 @@ public class MessageHeaders {
}
/** The Constant supportedMajorVersions. */
- private static final Map<String, String> supportedMajorVersions = new HashMap<String, String>();
+ private static final Map<String, String> supportedMajorVersions = new HashMap<>();
static {
supportedMajorVersions.put("v1", "0");
@@ -73,7 +73,7 @@ public class MessageHeaders {
}
/** The Constant supportedMajorMinorVersions. */
- private static final Set<String> supportedMajorMinorVersions = new HashSet<String>();
+ private static final Set<String> supportedMajorMinorVersions = new HashSet<>();
static {
supportedMajorMinorVersions.add("v1.0");
diff --git a/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java b/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java
index 328bd3e..e8510f0 100755
--- a/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java
+++ b/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafAuthProvider.java
@@ -55,7 +55,7 @@ public class AafAuthProvider implements AuthenticationProvider {
AafClientCache clientCache;
@Override
- public Authentication authenticate(Authentication authentication) throws AuthenticationException {
+ public Authentication authenticate(Authentication authentication) {
String name = authentication.getName();
String password = authentication.getCredentials().toString();
String sessionId = null;
diff --git a/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java b/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java
index 1b2facb..67894eb 100755
--- a/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java
+++ b/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java
@@ -138,13 +138,11 @@ public class AafClientCache {
cacheAge = now;
}
permissions = cache.get(getCacheKey(auth));
- if (permissions == null) {
- if (!auth.get("password").equals("")) {
- permissions = getPermissionsFromAaf(auth);
+ if ((permissions == null)&&(!auth.get("password").equals(""))) {
+ permissions = getPermissionsFromAaf(auth);
if (permissions != null) {
cache.put(getCacheKey(auth), permissions);
}
- }
}
}
return permissions;
@@ -255,8 +253,7 @@ public class AafClientCache {
private String getToken(String auth) {
try {
- String token = new String(DatatypeConverter.parseBase64Binary(auth));
- return token;
+ return new String(DatatypeConverter.parseBase64Binary(auth));
} catch (Exception e) {
return auth;
}