Repository: atlas
Updated Branches:
  refs/heads/master dd00c8596 -> ecd053685


ATLAS-2017: updated import API to make request parameter optional (#2 - fix for 
unit test failure)


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

Branch: refs/heads/master
Commit: ecd053685e547ac86dbfaed290cd3063955ce94a
Parents: dd00c85
Author: Madhan Neethiraj <mad...@apache.org>
Authored: Wed Aug 2 23:50:51 2017 -0700
Committer: Madhan Neethiraj <mad...@apache.org>
Committed: Thu Aug 3 00:02:59 2017 -0700

----------------------------------------------------------------------
 .../org/apache/atlas/repository/impexp/ImportService.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/ecd05368/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
----------------------------------------------------------------------
diff --git 
a/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
 
b/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
index efe7687..bbe9ed0 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
@@ -60,15 +60,17 @@ public class ImportService {
         return run(source, null, userName, hostName, requestingIP);
     }
 
+
     public AtlasImportResult run(ZipSource source, AtlasImportRequest request, 
String userName,
                                  String hostName, String requestingIP) throws 
AtlasBaseException {
+        if (request == null) {
+            request = new AtlasImportRequest();
+        }
+
         AtlasImportResult result = new AtlasImportResult(request, userName, 
requestingIP, hostName, System.currentTimeMillis());
 
         try {
             LOG.info("==> import(user={}, from={})", userName, requestingIP);
-            if (request == null) {
-                request = new AtlasImportRequest();
-            }
 
             String transforms = MapUtils.isNotEmpty(request.getOptions()) ? 
request.getOptions().get(AtlasImportRequest.TRANSFORMS_KEY) : null;
 

Reply via email to