ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [2/8] ignite git commit: IGNITE-6223 Fixed NPE when data is null on job fail.
Date Wed, 13 Sep 2017 10:52:22 GMT
IGNITE-6223 Fixed NPE when data is null on job fail.


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

Branch: refs/heads/ignite-5896
Commit: fdfd47367756816104620a1f324e0e38f6a68d8f
Parents: d753e90
Author: vsisko <vsisko@gridgain.com>
Authored: Wed Aug 30 16:43:17 2017 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Sep 13 17:25:53 2017 +0700

----------------------------------------------------------------------
 .../console/agent/handlers/AbstractListener.java      | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fdfd4736/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/AbstractListener.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/AbstractListener.java
b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/AbstractListener.java
index faf864b..2eec89b 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/AbstractListener.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/AbstractListener.java
@@ -76,15 +76,17 @@ abstract class AbstractListener implements Emitter.Listener {
                         if (res instanceof RestResult) {
                             RestResult restRes = (RestResult) res;
 
-                            ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
-                            Base64OutputStream b64os = new Base64OutputStream(baos);
-                            GZIPOutputStream gzip = new GZIPOutputStream(b64os);
+                            if (restRes.getData() != null) {
+                                ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
+                                Base64OutputStream b64os = new Base64OutputStream(baos);
+                                GZIPOutputStream gzip = new GZIPOutputStream(b64os);
 
-                            gzip.write(restRes.getData().getBytes());
+                                gzip.write(restRes.getData().getBytes());
 
-                            gzip.close();
+                                gzip.close();
 
-                            restRes.zipData(baos.toString());
+                                restRes.zipData(baos.toString());
+                            }
                         }
 
                         cb.call(null, toJSON(res));


Mime
View raw message