[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/optimistic ...
Manik Surtani
manik at jboss.org
Mon Jun 11 08:58:15 EDT 2007
User: msurtani
Date: 07/06/11 08:58:15
Modified: tests/functional/org/jboss/cache/optimistic
AbstractOptimisticTestCase.java
Log:
Reduce Java5 related ide generated warnings
Revision Changes Path
1.49 +5 -8 JBossCache/tests/functional/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractOptimisticTestCase.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- AbstractOptimisticTestCase.java 29 May 2007 13:51:27 -0000 1.48
+++ AbstractOptimisticTestCase.java 11 Jun 2007 12:58:15 -0000 1.49
@@ -37,8 +37,7 @@
import java.io.DataOutputStream;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Random;
@@ -338,17 +337,15 @@
}
}
- protected List injectDataVersion(List modifications)
+ protected List injectDataVersion(List<MethodCall> modifications)
{
- List newList = new ArrayList();
- Iterator mi = modifications.iterator();
- while (mi.hasNext())
+ List<MethodCall> newList = new LinkedList<MethodCall>();
+ for (MethodCall c : modifications)
{
- MethodCall c = (MethodCall) mi.next();
Object[] oa = c.getArgs();
Object[] na = new Object[oa.length + 1];
System.out.println("*** " + oa.length);
- for (int i = 0; i < oa.length; i++) na[i] = oa[i];
+ System.arraycopy(oa, 0, na, 0, oa.length);
na[oa.length] = new DefaultDataVersion();
newList.add(MethodCallFactory.create(MethodDeclarations.getVersionedMethod(c.getMethodId()), na));
}
More information about the jboss-cvs-commits
mailing list