atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-atlas git commit: ATLAS-1939: added parameter validation to prevent NPE during import
Date Sat, 15 Jul 2017 21:32:48 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/0.8-incubating da9a0e2e7 -> e4565a5f5


ATLAS-1939: added parameter validation to prevent NPE during import

Signed-off-by: Madhan Neethiraj <madhan@apache.org>
(cherry picked from commit eddab3b12a1318f6e787d062816e28479715f077)


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/e4565a5f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/e4565a5f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/e4565a5f

Branch: refs/heads/0.8-incubating
Commit: e4565a5f51bdefc3d6ab396d7d78294099a59973
Parents: da9a0e2
Author: Sharmadha Sainath <ssainath@hortonworks.com>
Authored: Sat Jul 15 01:16:31 2017 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Sat Jul 15 14:32:32 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/e4565a5f/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 9a761ec..7c71a8c 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
@@ -371,6 +371,10 @@ public class AdminResource {
         AtlasImportResult result;
 
         try {
+            if (StringUtils.isEmpty(jsonData)) {
+                jsonData = "{}";
+            }
+
             AtlasImportRequest request = AtlasType.fromJson(jsonData, AtlasImportRequest.class);
             ZipSource zipSource = new ZipSource(inputStream);
 


Mime
View raw message