Fixed NPE when data is null on job fail.
@@ -76,6 +76,7 @@ abstract class AbstractListener implements Emitter.Listener {
if (res instanceof RestResult) {
RestResult restRes = (RestResult) res;
+ if (restRes.getData() != null) {
ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
Base64OutputStream b64os = new Base64OutputStream(baos);
GZIPOutputStream gzip = new GZIPOutputStream(b64os);
@@ -86,6 +87,7 @@ abstract class AbstractListener implements Emitter.Listener {
restRes.zipData(baos.toString());
}
+ }
cb.call(null, toJSON(res));
} catch (Exception e) {
