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

[jira] Resolved: (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:all-tabpanel ]

Igor Vaynberg resolved WICKET-3189.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg

this code is refactored in later versions

> 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.