Commit 016eaffa by Ashutosh Mestry

ATLAS-2897: Better handling of empty zip files.

parent 8a26c79e
...@@ -65,7 +65,6 @@ public class AtlasServerService { ...@@ -65,7 +65,6 @@ public class AtlasServerService {
try { try {
return dataAccess.load(server); return dataAccess.load(server);
} catch (AtlasBaseException e) { } catch (AtlasBaseException e) {
LOG.error("dataAccess", e);
throw e; throw e;
} }
} }
......
...@@ -72,10 +72,14 @@ public class ZipSource implements EntityImportStream { ...@@ -72,10 +72,14 @@ public class ZipSource implements EntityImportStream {
} }
private boolean isZipFileEmpty() { private boolean isZipFileEmpty() {
return MapUtils.isEmpty(guidEntityJsonMap) || if (MapUtils.isEmpty(guidEntityJsonMap)) {
(guidEntityJsonMap.containsKey(ZipExportFileNames.ATLAS_EXPORT_ORDER_NAME.toString()) && return true;
(guidEntityJsonMap.get(ZipExportFileNames.ATLAS_EXPORT_ORDER_NAME.toString()) == null) }
);
String key = ZipExportFileNames.ATLAS_EXPORT_ORDER_NAME.toString();
return (guidEntityJsonMap.containsKey(key) &&
StringUtils.isNotEmpty(guidEntityJsonMap.get(key)) &&
guidEntityJsonMap.get(key).equals("[]"));
} }
public ImportTransforms getImportTransform() { return this.importTransform; } public ImportTransforms getImportTransform() { return this.importTransform; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment