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 2007/09/20 08:40:32 UTC
[jira] Resolved: (WICKET-981) NPE in Component.remove(final
IBehavior behavior)
[ https://issues.apache.org/jira/browse/WICKET-981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-981.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.3.0-beta4
> 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:
> martinfunk@IT02 /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.