diff options
author | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-06-03 09:45:32 +0300 |
---|---|---|
committer | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-06-05 10:08:10 +0300 |
commit | ae776a1394b7edc9c42db471b48b330d6789643b (patch) | |
tree | 74e5a1e5434961f4ce171815d334a597470e696e | |
parent | fbcac9be97567ca19b1018861d1ab37d2dea769f (diff) |
Fixed deref of null object at error message
Issue-ID: AAF-837
Change-Id: Ied689ca30d0949e92a92b723fc77f417ade5f0e8
Signed-off-by: AlexMolyavko <o.moliavko@samsung.com>
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Function.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Function.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Function.java index 690ffa08..43e121ac 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Function.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Function.java @@ -628,7 +628,12 @@ public class Function { return Result.err(Status.ERR_DependencyExists, sb.toString()); } - if (move && (parent == null || parent.type == NsType.COMPANY.type)) { + if (move && parent == null) { + return Result + .err(Status.ERR_DependencyExists, + "Cannot move users, roles or permissions - parent is missing.\nDelete dependencies and try again"); + } + else if (move && parent.type == NsType.COMPANY.type) { return Result .err(Status.ERR_DependencyExists, "Cannot move users, roles or permissions to [%s].\nDelete dependencies and try again", |