avoid possible logging npe in race

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1411932 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-11-20 23:50:39 +00:00
parent 925dcb80bd
commit 617028b3c1

View File

@ -186,7 +186,7 @@ public class ZkStateReader {
if (EventType.None.equals(event.getType())) {
return;
}
log.info("A cluster state change has occurred - updating... ({})", ZkStateReader.this.clusterState.getLiveNodes().size());
log.info("A cluster state change has occurred - updating... ({})", ZkStateReader.this.clusterState == null ? 0 : ZkStateReader.this.clusterState.getLiveNodes().size());
try {
// delayed approach