Commit c746a050 by Ashutosh Mestry

ATLAS-2330: Updated to address unit test failure. Root cause: Change in behavior in AtlasJson.

parent a7f3e1ad
...@@ -135,12 +135,18 @@ public class ZipSource implements EntityImportStream { ...@@ -135,12 +135,18 @@ public class ZipSource implements EntityImportStream {
} }
private <T> T convertFromJson(Class<T> clazz, String jsonData) throws AtlasBaseException { private <T> T convertFromJson(Class<T> clazz, String jsonData) throws AtlasBaseException {
T t;
try { try {
return AtlasType.fromJson(jsonData, clazz); t = AtlasType.fromJson(jsonData, clazz);
if(t == null) {
throw new AtlasBaseException("Error converting file to JSON.");
}
} catch (Exception e) { } catch (Exception e) {
throw new AtlasBaseException("Error converting file to JSON.", e); throw new AtlasBaseException("Error converting file to JSON.", e);
} }
return t;
} }
private String getFromCache(String entryName) { private String getFromCache(String entryName) {
......
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