Author: borges
Date: 2011-12-06 08:01:30 -0500 (Tue, 06 Dec 2011)
New Revision: 11858
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
Log:
Fix list usage.
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-12-06
13:01:10 UTC (rev 11857)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-12-06
13:01:30 UTC (rev 11858)
@@ -1233,7 +1233,8 @@
Assert.assertTrue(counts.contains(messageCount));
}
- List<LinkedList<Integer>> lists = new
ArrayList<LinkedList<Integer>>(consumerIDs.length);
+ @SuppressWarnings("unchecked")
+ LinkedList<Integer>[] lists = new LinkedList[consumerIDs.length];
for (int i = 0; i < messageCounts.length; i++)
{
@@ -1243,7 +1244,7 @@
if (elem == messageCounts[i])
{
- lists.set(i, list);
+ lists[i] = list;
break;
}
@@ -1253,7 +1254,7 @@
for (int messageCount : messageCounts)
{
- LinkedList<Integer> list = lists.get(index);
+ LinkedList<Integer> list = lists[index];
Assert.assertNotNull(list);