[hornetq-commits] JBoss hornetq SVN: r10207 - branches/Branch_2_2_EAP/src/main/org/hornetq/utils.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Feb 15 14:22:35 EST 2011


Author: clebert.suconic at jboss.com
Date: 2011-02-15 14:22:34 -0500 (Tue, 15 Feb 2011)
New Revision: 10207

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/utils/LinkedListImpl.java
Log:
fixing possible NPE

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/utils/LinkedListImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/utils/LinkedListImpl.java	2011-02-15 10:51:24 UTC (rev 10206)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/utils/LinkedListImpl.java	2011-02-15 19:22:34 UTC (rev 10207)
@@ -41,7 +41,7 @@
    private int size;
 
    // We store in an array rather than a Map for the best performance
-   private Iterator[] iters;
+   private volatile Iterator[] iters;
 
    private int numIters;
 
@@ -186,7 +186,11 @@
    {
       for (int i = 0; i < numIters; i++)
       {        
-         iters[i].nudged(node);
+         Iterator iter = iters[i];
+         if (iter != null)
+         {
+            iter.nudged(node);
+         }
       }
    }
 



More information about the hornetq-commits mailing list