diff options
Diffstat (limited to 'auth/auth-cass/src/main/java')
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java index 18b57d8b..f55e1c1c 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java @@ -401,7 +401,13 @@ public class Question { } } } else { - return Result.err(Status.ERR_NsNotFound,"There is no valid Company Namespace for %s",str); + int dot = str.lastIndexOf('.'); + + if (dot < 0) { + return Result.err(Status.ERR_NsNotFound,"There is no valid Company Namespace for %s",str); + } else { + return deriveFirstNsForType(trans, str.substring(0, dot),type); + } } } return Result.err(Status.ERR_NotFound, str + " does not contain type " + type.name()); |