[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/pojo/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/pojo/optimistic
AbstractOptimisticTestCase.java
Log:
Reduce Java5 related ide generated warnings
Revision Changes Path
1.4 +29 -32 JBossCache/tests/functional/org/jboss/cache/pojo/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/pojo/optimistic/AbstractOptimisticTestCase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- AbstractOptimisticTestCase.java 23 May 2007 10:28:49 -0000 1.3
+++ AbstractOptimisticTestCase.java 11 Jun 2007 12:58:15 -0000 1.4
@@ -51,8 +51,7 @@
import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Random;
@@ -365,17 +364,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