You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2018/05/01 01:57:19 UTC

[incubator-pulsar] branch master updated: Check if javaInstance is created in the first place before invocing close (#1688)

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 600b55d  Check if javaInstance is created in the first place before invocing close (#1688)
600b55d is described below

commit 600b55d2aff1aed6427348fe50cb1d4a3bc5a809
Author: Sanjeev Kulkarni <sa...@gmail.com>
AuthorDate: Mon Apr 30 18:57:16 2018 -0700

    Check if javaInstance is created in the first place before invocing close (#1688)
---
 .../org/apache/pulsar/functions/instance/JavaInstanceRunnable.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
index e181204..a4fe026 100644
--- a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
+++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
@@ -348,7 +348,9 @@ public class JavaInstanceRunnable implements AutoCloseable, Runnable {
     @Override
     public void close() {
         processor.close();
-        javaInstance.close();
+        if (null != javaInstance) {
+            javaInstance.close();
+        }
 
         // kill the state table
         if (null != stateTable) {

-- 
To stop receiving notification emails like this one, please contact
sijie@apache.org.