incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Fixed a NPE when accessing thrit through the TServelet
Date Wed, 02 Oct 2013 12:46:36 GMT
Updated Branches:
  refs/heads/apache-blur-0.2 bdb9a7f14 -> e9b42ee09


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/e9b42ee0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/e9b42ee0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/e9b42ee0

Branch: refs/heads/apache-blur-0.2
Commit: e9b42ee099275cde3cb56a08e5bd5f0334d5fe95
Parents: bdb9a7f
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Oct 2 08:46:37 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Oct 2 08:46:37 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/e9b42ee0/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