fix a little null pointer bug

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1026314 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2010-10-22 13:05:03 +00:00
parent 321e8b6903
commit 900f1635fc
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ class SolrZkServerProps extends QuorumPeerConfig {
// multiple matches... try to figure out by port.
for (QuorumPeer.QuorumServer server : slist.values()) {
if (server.addr.equals(thisAddr)) {
if (clientPortAddress != null || clientPortAddress.getPort() <= 0)
if (clientPortAddress == null || clientPortAddress.getPort() <= 0)
setClientPort(server.addr.getPort() - 1);
return server.id;
}