commit | 906f36517bd13cb3f5318e7843ebfd0276a2975f | [log] [tgz] |
---|---|---|
author | nixonrodrigues <nixon@apache.org> | Fri Jun 16 19:29:07 2017 +0530 |
committer | nixonrodrigues <nixon@apache.org> | Sun Jun 18 20:12:23 2017 +0530 |
tree | 5c4529422a7e7cfdc90281b854cbf808392a4867 | |
parent | c6081ddcfdb4c8100a4b099405ac8d397fbf9583 [diff] |
ATLAS-1878 - Fix for NPE when a request without any query path lands on atlas
diff --git a/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java b/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java index e907bf5..93d988e 100644 --- a/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java +++ b/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
@@ -44,6 +44,11 @@ if (isDebugEnabled) { LOG.debug("==> getApi({})", contextPath); } + + if(contextPath == null){ + contextPath = ""; + } + if (contextPath.startsWith(BASE_URL)) { contextPath = contextPath.substring(BASE_URL.length()); } else {