incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: Fixed a NPE when accessing thrit through the TServelet
Date Fri, 04 Oct 2013 13:21:54 GMT
Updated Branches:
  refs/heads/master 5e7edf81a -> c08b0404f


Fixed a NPE when accessing thrit through the TServelet


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

Branch: refs/heads/master
Commit: 0ac70060fad2c9f5ab5ebfe0323e19140008e325
Parents: 5e7edf8
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Oct 2 08:46:37 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Fri Oct 4 09:21:35 2013 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/blur/utils/BlurUtil.java   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/0ac70060/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
index 8827ba2..0e440e0 100644
--- a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
+++ b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
@@ -162,10 +162,18 @@ public class BlurUtil {
         String connectionString;
         if (controller) {
           ControllerServerContext controllerServerContext = ControllerServerContext.getShardServerContext();
-          connectionString = controllerServerContext.getConnectionString();
+          if (controllerServerContext == null) {
+            connectionString = "unknown";
+          } else {
+            connectionString = controllerServerContext.getConnectionString();  
+          }
         } else {
           ShardServerContext shardServerContext = ShardServerContext.getShardServerContext();
-          connectionString = shardServerContext.getConnectionString();
+          if (shardServerContext == null) {
+            connectionString = "unknown";
+          } else {
+            connectionString = shardServerContext.getConnectionString();
+          }
         }
         String argsStr = null;
         long start = System.nanoTime();


Mime
View raw message