cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hartmut.zimmerm...@basf-it-services.com
Subject Patch to "Problems with double click in coplet "
Date Thu, 17 Jul 2003 12:21:28 GMT

Hi at all, we have found the problem of the double click bug and fixed them
...

so and here is the code snippet of the double click bug in "class sunSpot"
, method "private showProtal(..)" :

The problem was, that all threads are working on the same list of
sunletContens. That is not pretty good, because one thread has modify the
list and another is working on that modified list?. You can imaging about
the consequence!
Our solution is to make an local copy of that list , so that every thread
is working on his own list.


The old implementation:
sunletContents = (List[])
context.getAttribute(Constants.ATTRIBUTE_SUNLET_REPOSITORY);

? and the new one:

List[] temp = (List[])
context.getAttribute(Constants.ATTRIBUTE_SUNLET_REPOSITORY);
if (temp == null) {
      sunletContents = null;
} else {
            sunletContents = new List[temp.length];
            for (int i = 0; i < temp.length; i++) {
                  if (temp[i] == null) {
                        sunletContents[i] = null;
                  } else {
                        sunletContents[i] = new ArrayList(temp[i]);
                  }
            }
}




------------------------------------------------------------------------
BASF IT Services GmbH
EC-TP - RAT17
Hartmut Zimmermann
Tel.: +49 621 60-58632




Mime
View raw message