You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/07/15 21:26:57 UTC
incubator-atlas git commit: ATLAS-1939: added parameter validation to
prevent NPE during import
Repository: incubator-atlas
Updated Branches:
refs/heads/master 84c6d52d2 -> eddab3b12
ATLAS-1939: added parameter validation to prevent NPE during import
Signed-off-by: Madhan Neethiraj <ma...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/eddab3b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/eddab3b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/eddab3b1
Branch: refs/heads/master
Commit: eddab3b12a1318f6e787d062816e28479715f077
Parents: 84c6d52
Author: Sharmadha Sainath <ss...@hortonworks.com>
Authored: Sat Jul 15 01:16:31 2017 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Sat Jul 15 14:22:41 2017 -0700
----------------------------------------------------------------------
.../main/java/org/apache/atlas/web/resources/AdminResource.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eddab3b1/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
index 2a5fc90..fe9111b 100755
--- a/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
@@ -370,6 +370,10 @@ public class AdminResource {
AtlasImportResult result;
try {
+ if (StringUtils.isEmpty(jsonData)) {
+ jsonData = "{}";
+ }
+
AtlasImportRequest request = AtlasType.fromJson(jsonData, AtlasImportRequest.class);
ZipSource zipSource = new ZipSource(inputStream);