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

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

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


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.


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

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos updated WICKET-3189:
---------------------------------

    Comment: was deleted

(was: A comment with security level 'jira-users' was removed.)

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


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

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935160#action_12935160 ] 

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.


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

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ 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.