You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Pedro Santos (JIRA)" <ji...@apache.org> on 2010/11/24 02:08:13 UTC

[jira] Commented: (WICKET-3189) Component getBehaviorId might add behavior to more than one slot

    [ https://issues.apache.org/jira/browse/WICKET-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935159#action_12935159 ] 

Pedro Santos commented on WICKET-3189:
--------------------------------------

Hi Richard, it is already fixed in the trunk. This code is now in the utility class Behaviors

> Component getBehaviorId might add behavior to more than one slot
> ----------------------------------------------------------------
>
>                 Key: WICKET-3189
>                 URL: https://issues.apache.org/jira/browse/WICKET-3189
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: All
>            Reporter: Richard Emberson
>            Assignee: Igor Vaynberg
>
> In Component getBehaviorId there is the following code:
>     if (id < 0)
>     {
>       // try to find an unused slot
>       for (int i = 0; i < ids.size(); i++)
>       {
>         if (ids.get(i) == null)
>         {
>           ids.set(i, behavior);
>           id = i;
>         }
>       }
>     }
> If the comment is right, then the for-loop should break after the first slot is found and set.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.