[ 
https://issues.apache.org/jira/browse/WICKET-981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg reassigned WICKET-981:
------------------------------------

    Assignee: Igor Vaynberg

> NPE in Component.remove(final IBehavior behavior)
> -------------------------------------------------
>
>                 Key: WICKET-981
>                 URL: https://issues.apache.org/jira/browse/WICKET-981
>             Project: Wicket
>          Issue Type: Bug
>         Environment: current trunk
>            Reporter: Martin Funk
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>
> If the behaviors are null a NPE is thrown
> Proposal:
> [EMAIL PROTECTED] /cygdrive/c/martinf/svn/wicket-trunk
> $ svn diff ./jdk-1.4/wicket/src/main/java/org/apache/wicket/ -r HEAD
> Index: jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
> ===================================================================
> --- jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java       
> (revision 576323)
> +++ jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java       
> (working copy)
> @@ -1894,7 +1894,7 @@
>                 {
>                         throw new IllegalArgumentException("Argument 
> `behavior` cannot be null");
>                 }
> -               if (!behaviors.contains(behavior))
> +               if (behaviors == null || !behaviors.contains(behavior))
>                 {
>                         throw new IllegalStateException(
>                                         "Tried to remove a behavior that was 
> not added to the component. Behavior: " +

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

Reply via email to