diff options
author | 2019-06-27 07:48:27 -0500 | |
---|---|---|
committer | 2019-06-27 07:48:33 -0500 | |
commit | f6f44f558ce4f04605269f71a10d6df054295f6a (patch) | |
tree | bc93c77a36fb53eeac525ec1df876b243d663247 /auth/auth-core/src/main/java/org | |
parent | ba989d05eca8d2a98c51ed9d38c4c3345db23349 (diff) |
SONAR flagged fixes
Issue-ID: AAF-857
Change-Id: I0b2d6b985fd7f8abc3d133d6db37865aa300e75f
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-core/src/main/java/org')
-rw-r--r-- | auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java | 2 | ||||
-rw-r--r-- | auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java index 943b92f5..098fb979 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java @@ -71,7 +71,7 @@ public class OrganizationFactory { String realm = env.getProperty(Config.AAF_DEFAULT_REALM,"people.osaaf.org"); defaultOrg = cnst.newInstance(env,realm); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | SecurityException | IllegalArgumentException | InvocationTargetException e) { - env.warn().log("Default Organization Module not linked in",e); + env.init().log("Default Organization Module not linked in",e); } } if (defaultOrg == null) { diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java index c0f2f530..98c09076 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java @@ -185,13 +185,16 @@ public class Validator { } public final Validator role(String user, String role) { + boolean quit = false; if(role==null) { msg("Role is null"); + quit = true; } if(user==null) { - msg("User is null"); + msg("User is null"); + quit = true; } - if(!err()) { + if(!quit) { if(role.startsWith(user) && role.endsWith(":user")) { if(!(role.length() == user.length() + 5)) { msg("Role [" + role + "] is invalid."); |