Updated Branches: refs/heads/0.2-dev 688e5bcfa -> a4f79fa3f
Give a nice runtimeexception for a null value too Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/a4f79fa3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/a4f79fa3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/a4f79fa3 Branch: refs/heads/0.2-dev Commit: a4f79fa3f60fa9c7ec0a1b435b07e1383f2f91d3 Parents: 688e5bc Author: williamstw <[email protected]> Authored: Sat Jan 19 13:21:09 2013 -0500 Committer: williamstw <[email protected]> Committed: Sat Jan 19 13:21:09 2013 -0500 ---------------------------------------------------------------------- .../java/org/apache/blur/thrift/Connection.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a4f79fa3/src/blur-thrift/src/main/java/org/apache/blur/thrift/Connection.java ---------------------------------------------------------------------- diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/Connection.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/Connection.java index a2044f1..1b65351 100644 --- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/Connection.java +++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/Connection.java @@ -25,7 +25,11 @@ public class Connection { private boolean _proxy = false; public Connection(String connectionStr) { - int index = connectionStr.indexOf(':'); + int index = -1; + if(connectionStr != null) { + index = connectionStr.indexOf(':'); + } + if (index >= 0) { int slashIndex = connectionStr.indexOf('/'); if (slashIndex > 0) {
