diff options
author | Jonathan Gathman <jonathan.gathman@att.com> | 2019-07-03 14:08:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-03 14:08:19 +0000 |
commit | 078325f8ef05a6216292f5331ef0805a5bdd9ef1 (patch) | |
tree | f8e57d1065289a141ef035ab640c232fefa36f6b /auth | |
parent | feab2592f964ff68e04812aeafc807b4ce71048c (diff) | |
parent | ae776a1394b7edc9c42db471b48b330d6789643b (diff) |
Merge "Fixed deref of null object at error message"
Diffstat (limited to 'auth')
-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 3fde5123..c59312c0 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", |