You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2017/06/18 14:51:28 UTC
incubator-atlas git commit: ATLAS-1878 - Fix for NPE when a request
without any query path lands on atlas
Repository: incubator-atlas
Updated Branches:
refs/heads/master c6081ddcf -> 906f36517
ATLAS-1878 - Fix for NPE when a request without any query path lands on atlas
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/906f3651
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/906f3651
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/906f3651
Branch: refs/heads/master
Commit: 906f36517bd13cb3f5318e7843ebfd0276a2975f
Parents: c6081dd
Author: nixonrodrigues <ni...@apache.org>
Authored: Fri Jun 16 19:29:07 2017 +0530
Committer: nixonrodrigues <ni...@apache.org>
Committed: Sun Jun 18 20:12:23 2017 +0530
----------------------------------------------------------------------
.../apache/atlas/authorize/simple/AtlasAuthorizationUtils.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/906f3651/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
----------------------------------------------------------------------
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 @@ public class AtlasAuthorizationUtils {
if (isDebugEnabled) {
LOG.debug("==> getApi({})", contextPath);
}
+
+ if(contextPath == null){
+ contextPath = "";
+ }
+
if (contextPath.startsWith(BASE_URL)) {
contextPath = contextPath.substring(BASE_URL.length());
} else {