diff options
4 files changed, 7 insertions, 10 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;
}
@@ -38,7 +38,7 @@ <parent>
<groupId>org.onap.oparent</groupId>
<artifactId>oparent</artifactId>
- <version>2.0.0</version>
+ <version>2.1.0</version>
</parent>
<groupId>org.onap.optf.cmso</groupId>
|