You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by ha...@basf-it-services.com on 2003/07/17 14:21:28 UTC

Patch to "Problems with double click in coplet "

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




RE: Patch to "Problems with double click in coplet "

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Hi Hartmut,

thanks for the patch - I just applied it.

It took some time...but finally it got applied.

Thanks
Carsten

> -----Original Message-----
> From: hartmut.zimmermann@basf-it-services.com
> [mailto:hartmut.zimmermann@basf-it-services.com]
> Sent: Thursday, July 17, 2003 2:21 PM
> To: dev@cocoon.apache.org
> Subject: Patch to "Problems with double click in coplet "
>
>
>
> 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
>
>
>