incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [5/7] git commit: Added null checks in close.
Date Sun, 31 Mar 2013 15:10:57 GMT
Added null checks in close.


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

Branch: refs/heads/0.1.5
Commit: fd7bead35d5ab9ba7433253eba707b5060e4c288
Parents: 77ea8b8
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sun Mar 31 11:09:27 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sun Mar 31 11:09:27 2013 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/thrift/ThriftServer.java  |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fd7bead3/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java b/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java
index 79724b0..787b034 100644
--- a/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java
@@ -79,9 +79,15 @@ public class ThriftServer {
       _closed = true;
       _shutdown.shutdown();
       _server.stop();
-      _executorService.shutdownNow();
-      _queryExexutorService.shutdownNow();
-      _mutateExecutorService.shutdownNow();
+      if (_executorService != null) {
+        _executorService.shutdownNow();
+      }
+      if (_queryExexutorService != null) {
+        _queryExexutorService.shutdownNow();
+      }
+      if (_mutateExecutorService != null) {
+        _mutateExecutorService.shutdownNow();
+      }
     }
   }
 


Mime
View raw message