Hi Thomas,
Considering the amount of changes, I would propose to call the next release 3.2, and therefore abandon the TORQUE_3_1_BRANCH. If someone feels it necessary to do further commits to the TORQUE_3_1_BRANCH, PLEASE also commit the changes to HEAD, if it makes any sense.
Would you please introduce the attached patch into LargeSelect.java. It was posted here in the list some time ago by someone else and deals with the infamous ConcurrentModificationException in the thread code. I thought the patch had made it already into the CVS but I found it missing in the new HEAD.
(BTW: Your join patches work quite well in my application. The tests were all successful!)
Bye, Thomas.
--- LargeSelect.java.orig Wed Feb 9 19:22:04 2005
+++ LargeSelect.java Wed Feb 9 19:28:48 2005
@@ -624,7 +624,13 @@
+ "fromIndex + Math.min(size, results.size() - fromIndex)
("
+ toIndex + ")");
}
- List returnResults = results.subList(fromIndex, toIndex);
+
+ List returnResults;
+
+ synchronized (results)
+ {
+ returnResults = new ArrayList(results.subList(fromIndex, toIndex));
+ }
if (null != returnBuilderClass)
{
@@ -705,9 +711,12 @@
List tempResults
= BasePeer.getSelectResults(qds, size, false);
- for (int i = 0, n = tempResults.size(); i < n; i++)
+ synchronized (results)
{
- results.add(tempResults.get(i));
+ for (int i = 0, n = tempResults.size(); i < n; i++)
+ {
+ results.add(tempResults.get(i));
+ }
}
currentlyFilledTo += tempResults.size();
@@ -717,7 +726,10 @@
// on the last page but we must now get rid of it.
if (results.size() == memoryLimit + 1)
{
- results.remove(currentlyFilledTo--);
+ synchronized (results)
+ {
+ results.remove(currentlyFilledTo--);
+ }
perhapsLastPage = false;
}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
