[jboss-cvs] JBoss Messaging SVN: r8181 - branches/JBM1842/src/main/org/jboss/messaging/core/impl/postoffice.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 21 05:35:14 EST 2011
Author: gaohoward
Date: 2011-01-21 05:35:14 -0500 (Fri, 21 Jan 2011)
New Revision: 8181
Modified:
branches/JBM1842/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
Log:
fix npe
Modified: branches/JBM1842/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- branches/JBM1842/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java 2011-01-21 10:04:31 UTC (rev 8180)
+++ branches/JBM1842/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java 2011-01-21 10:35:14 UTC (rev 8181)
@@ -566,7 +566,12 @@
while (iter.hasNext())
{
Integer qNodeID = iter.next();
- if (clusterStateCopy.isNodeDead(qNodeID))
+
+ Boolean isDead = clusterStateCopy.isNodeDead(qNodeID);
+
+ if (isDead == null) continue;
+
+ if (isDead)
{
//update node status. this definitely not me!
this.updateStateInStorage(qNodeID, STATE_DEAD);
@@ -4022,9 +4027,13 @@
return nState.isQurarntined();
}
- public boolean isNodeDead(Integer qNodeID)
+ public Boolean isNodeDead(Integer qNodeID)
{
NodeState nState = states.get(qNodeID);
+
+ //if doesn't exists, it is already dead.
+ if (nState == null) return null;
+
return nState.isDead();
}
}
More information about the jboss-cvs-commits
mailing list