check coll==null in CollectionRef.toString()

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1669214 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2015-03-25 19:57:05 +00:00
parent f0ea6a662d
commit b741482d58
1 changed files with 6 additions and 2 deletions

View File

@ -228,7 +228,7 @@ public class ClusterState implements JSONWriter.Writable {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("live nodes:" + liveNodes);
sb.append(" collections:" + collectionStates);
sb.append("collections:" + collectionStates);
return sb.toString();
}
@ -394,7 +394,11 @@ public class ClusterState implements JSONWriter.Writable {
@Override
public String toString() {
return coll.toString();
if (coll != null) {
return coll.toString();
} else {
return "null DocCollection ref";
}
}
}